This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install script for Latest WordPress by Johnathan Williamson - extended by Don Gilbert | |
# Disclaimer: It might not bloody work | |
# Disclaimer 2: I'm not responsible for any screwups ... :) | |
# DB Variables | |
echo "MySQL Host:" | |
read mysqlhost | |
export mysqlhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import argparse | |
import imutils | |
import cv2 | |
import sys | |
cascPath = sys.argv[1] | |
faceCascade = cv2.CascadeClassifier(cascPath) | |
# captura a webcam | |
camera = cv2.VideoCapture(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CONVERT(CONVERT(name USING BINARY) USING latin1) AS latin1, | |
CONVERT(CONVERT(name USING BINARY) USING utf8) AS utf8 | |
FROM users | |
WHERE CONVERT(name USING BINARY) RLIKE CONCAT('[', UNHEX('80'), '-', UNHEX('FF'), ']') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Magento login information | |
$mage_url = 'http://MAGENTO/api/soap?wsdl'; | |
$mage_user = 'soap_user'; | |
$mage_api_key = '********'; | |
// Initialize the SOAP client | |
$soap = new SoapClient( $mage_url ); | |
// Login to Magento | |
$session_id = $soap->login( $mage_user, $mage_api_key ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getUrlParameter(sParam) | |
{ | |
var sPageURL = window.location.search.substring(1); | |
var sURLVariables = sPageURL.split('&'); | |
for (var i = 0; i < sURLVariables.length; i++) | |
{ | |
var sParameterName = sURLVariables[i].split('='); | |
if (sParameterName[0] == sParam) | |
{ | |
return sParameterName[1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo | openssl s_client -connect google.com:443 2>/dev/null | openssl x509 -noout -dates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# use imagemagick to merge all images in a folder to produce a spritesheet | |
# use conver -append for vertical stacking and | |
# convert +append for horizontal | |
if [ $# -gt 0 ] | |
then | |
if [ $2 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# downgrade to php5.4 first | |
sudo apt-get install software-properties-common python-software-properties | |
sudo add-apt-repository ppa:ondrej/php5-oldstable -y | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install php5 | |
# install ajenti | |
wget -O- https://raw.github.com/Eugeny/ajenti/master/scripts/install-ubuntu.sh | sudo sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="carousel-inner"> | |
<div class="item"> | |
<?php | |
$input_array = array('a', 'b', 'c', 'd', 'e'); | |
$carousel = array_chunk($input_array, 2); | |
foreach($carousel as $c): | |
?> | |
<div class="row"> | |
<?php foreach($c as $item):?> | |
<div class="col-md-3"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Attention!, this scripts needs a modified version of timthumb you'll find in my git account. | |
#Francisco Aranda, Developer, Software Architect and Enterpreneur, Chile. | |
#http://farandal.com | |
#http://www.git.com/farandal | |
location ~ /thumb/.*\.(png|jpg)$ { | |
#set $domain yourdomain.com; # Change this to your site's domain name, you may or not need to uncomment this. | |
set $root_fcgi /home/user/public_html/yourdomain.com/public; # Change this to the public root folder of your site | |
set $root_cache $root_fcgi/thumb; # Change this to a folder in which to cache the minified files |
NewerOlder