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
CREATE TABLE `_mydata` ( | |
`id` int(10) unsigned NOT NULL, | |
`version` int(10) unsigned NOT NULL, | |
`creation` datetime DEFAULT NULL, | |
`data` varchar(100) DEFAULT NULL, | |
`action` varchar(45) DEFAULT NULL, | |
PRIMARY KEY (`id`,`version`), | |
UNIQUE KEY `id_version` (`id`,`version`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
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
monolog: | |
handlers: | |
main: | |
type: stream | |
path: %kernel.root_dir%/../../logs/%kernel.environment%.log | |
level: debug | |
firephp: | |
type: firephp | |
level: info |
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 | |
filename=$(basename "$1") | |
sips -z 64 64 $1 --out /res/drawable-xhdpi/$filename | |
sips -z 45 45 $1 --out /res/drawable-hdpi/$filename | |
sips -z 32 32 $1 --out /res/drawable-mdpi/$filename | |
sips -z 16 16 $1 --out /res/drawable-ldpi/$filename |
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
LANG="en_US.UTF-8" | |
LANGUAGE="en_US:en" | |
LC_ADDRESS="en_US.UTF-8" | |
LC_ALL="en_US.UTF-8" | |
LC_COLLATE="en_US.UTF-8" | |
LC_CTYPE="en_US.UTF-8" | |
LC_IDENTIFICATION="en_US.UTF-8" | |
LC_MEASUREMENT="en_US.UTF-8" | |
LC_MESSAGES="en_US.UTF-8" | |
LC_MONETARY="en_US.UTF-8" |
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 | |
brew install freetype libjpg libpng pcre icu4c autoconf | |
sudo ln -s /usr/local/Cellar/icu4c/51.1/bin/icu-config /usr/bin/icu-config | |
./configure \ | |
--prefix=/usr \ | |
--mandir=/usr/share/man \ | |
--infodir=/usr/share/info \ |
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 | |
ACTION=$1 | |
DATABASE_NAME=$2 | |
SQL_FILE=$3 | |
if [[ "$ACTION" == "import" ]]; then | |
if [[ -f "$SQL_FILE" ]]; then | |
# Drop existing database | |
echo -n "Dropping ${DATABASE_NAME}..." |
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 | |
TODAY="*$(date +%A)*" | |
WORKDAYS="Monday Tuesday Wednesday Thursday Friday" | |
SCREENSHOT_PATH="$HOME/Pictures/Screenshots/$(date +%Y)/$(date +%B)/$(date +%A)" | |
if [[ ! -d $SCREENSHOT_PATH ]] | |
then | |
mkdir -p $SCREENSHOT_PATH | |
fi |
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 | |
sudo sh -c 'echo "1024 65000" > /proc/sys/net/ipv4/ip_local_port_range' |
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
<script type="text/javascript"> | |
jQuery(document).ready(function() { | |
var maxHeight = <?php echo intval($_product->getMaxHeight()); ?>; | |
jQuery('.qty').change(function(){ | |
var currentHeight = 0; | |
jQuery('.qty').each(function(index) { | |
var height = parseInt(jQuery(this).attr('data-height')); | |
var qty = parseInt(jQuery(this).val()); |
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 | |
BREAK="===============================================================";echo -ne "\n $BREAK \n \t Disk Usage for $(pwd) $(date +'%F') \n $BREAK \n\n";df -h $(pwd); echo -e '\n\n Volume Group Usage: \n'; vgs $(df -h $(pwd) | grep dev | awk '{print $1}'| cut -d\- -f1| cut -d\/ -f4); echo -e '\n'; echo -e "Largest Folders:\n"; du -xSk $(pwd) | sort -rn | head -30|awk '{printf "%d MB\t%s\n",($1/1024),$NF}' && echo -e "\n\n"; echo -e "Largest Files:\n"; find $(pwd) -mount -type f -ls|sort -rnk7 |head -30|awk '{printf "%d MB\t%s\n",($7/1024)/1024,$NF}';echo -e "\n\n Open Deleted Files:\n" ;lsof | grep $(pwd) | grep deleted| awk '{ if($7 > 1048576) print $7/1048576, "MB ",$9,$1 }' | sort -n -u | tail; echo -e "\n $BREAK" |
OlderNewer