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/sh | |
# | |
# chmodr.sh | |
# | |
# author: Francis Byrne | |
# date: 2011/02/12 | |
# | |
# Generic Script for recursively setting permissions for directories and files | |
# to defined or default permissions using chmod. | |
# |
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 Validator의 경고 메시지를 alert 창에 표시한다. | |
--> | |
$(document).ready(function(){ | |
$.validator.setDefaults({ | |
onkeyup: false | |
, onclick: false | |
, onfocusout: false | |
, showErrors: function(errorMap, errorList) { |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# for Python 3 | |
str(sample_bytes, '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
pip3 install -r requirements.txt |
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
from dateutil import parser | |
dt = parser.parse("Aug 28 1999 12:00AM") |
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
sudo apt-get install vim-puppet | |
ln -s /usr/share/vim/addons/syntax/puppet.vim ~/.vim/plugin/ |
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
from django.core import mail | |
@property | |
is_django_in_test_mode(): | |
return hasattr(mail, 'outbox') |
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
wget http://apt.puppetlabs.com/puppetlabs-release-pc1-wheezy.deb | |
sudo dpkg -i puppetlabs-release-pc1-wheezy.deb | |
# install the server | |
sudo apt-get update | |
sudo apt-get install puppetserver -y | |
sudo ln -s /opt/puppetlabs/bin/puppet /usr/local/bin/puppet | |
sudo ln -s /opt/puppetlabs/bin/facter /usr/local/bin/facter | |
sudo ln -s /opt/puppetlabs/bin/hiera /usr/local/bin/hiera | |
sudo ln -s /opt/puppetlabs/bin/mco /usr/local/bin/mco |
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
# check if the remote ntp port is open | |
sudo nc -uv 10.0.0.11 123 |
OlderNewer