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
# Remove the Delay for Auto-Hide & Auto-Show of Dock in OS X | |
defaults write com.apple.Dock autohide-delay -float 0 && killall Dock | |
# undo | |
defaults delete com.apple.Dock autohide-delay && killall Dock |
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
INSTALL JAVA | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
-- | |
# ubuntu 64bits issue | |
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6 |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Demo</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> | |
{{ form.media }} | |
</head> | |
<body> | |
<form action="" method="post"> |
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
# strategy_best.py | |
# Strategy pattern -- function-based implementation | |
# selecting best promotion from static list of functions | |
""" | |
>>> joe = Customer('John Doe', 0) | |
>>> ann = Customer('Ann Smith', 1100) | |
>>> cart = [LineItem('banana', 4, .5), | |
... LineItem('apple', 10, 1.5), | |
... LineItem('watermellon', 5, 5.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
dbdata: | |
image: <IMAGE> | |
volumes: | |
- /var/lib/postgresql | |
command: ['bash', '-c', 'echo "postgresql data container for db"; trap "exit 0" SIGTERM; while true; do sleep 5; done'] |
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
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/SublimeLinter/Material-Theme (SL).tmTheme", | |
"draw_minimap_border": true, | |
"draw_white_space": "all", | |
"find_selected_text": true, | |
"font_face": "Fira Code", | |
"font_options": | |
[ |
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 | |
datenow=$(date +%s) | |
sudo docker ps > /tmp/docker."$datenow" | |
sudo apt-get update && sudo apt-get install -y lxc-docker | |
sudo docker start $(tail -n +2 /tmp/docker."$datenow" | cut -c1-12) |
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
puttygen id_rsa -O private -o private.ppk |
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
apt-get install poppler-utils | |
pdftoppm -r 100 -png foo.pdf prefix |
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
$(document).ready(function(){ | |
$.getJSON("http://twitter.com/statuses/user_timeline/YOUR_TWITTER_USERNAME.json?callback=?", function(data) { | |
$("#last-tweet").html(data[0].text); | |
}); | |
}); |
OlderNewer