This file contains hidden or 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
# BAD | |
{hosts, [<% @domains.each_with_index do |domain, i| -%>"<%= domain %>"<% if i == @domains.length - 1 -%>, <% end -%><% end -%>]}. |
This file contains hidden or 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
class RelayBot(ClientXMPP): | |
def __init__(self, jid, password) : | |
super(RelayBot, self).__init__(jid, password) | |
self.add_event_handler("session_start", self.handle_session_start) | |
self.add_event_handler("presence_subscribe", | |
self.handle_presence_subscribe) | |
self.add_event_handler("presence_unsubscribe", | |
self.handle_presence_unsubscribe) | |
self.add_event_handler("message", self.handle_message) |
This file contains hidden or 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
@app.route('/some_path/') | |
def some_path(): | |
return render_template('some_template.html') |
This file contains hidden or 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
server { | |
root /var/www/example.com/static; | |
server_name example.com; | |
access_log /var/log/nginx/example.com.access.log; | |
error_log /var/log/nginx/example.com.error.log; | |
try_files /maintenance.html @proxy; | |
location @proxy { | |
proxy_pass http://127.0.0.1:10001; |
This file contains hidden or 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 | |
unset GIT_DIR | |
cd /home/<username>/public_html/scripts | |
git checkout <branchname> | |
git stash | |
git reset --hard HEAD | |
git pull origin <branchname> |
This file contains hidden or 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
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
ignorecase = true | |
[remote "origin"] | |
url = [email protected]:willowtreeapps/mcwilliamsballard | |
fetch = +refs/heads/*:refs/remotes/origin/* | |
[remote "dev"] |
This file contains hidden or 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 | |
(ssh [email protected] -p 1984 -o PermitLocalCommand=no \ | |
": > .irssi/fnotify ; tail -f .irssi/fnotify " | \ | |
while read heading message; do \ | |
growlnotify -s -t "${heading}" -m "${message}"; \ | |
#say "${heading} says, ${message}"; \ | |
done)& |
This file contains hidden or 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
servers = ( | |
{ address = "eu.irc6.net"; chatnet = "IRCnet"; port = "6667"; }, | |
{ | |
address = "irc.open-ircnet.net"; | |
chatnet = "IRCnet"; | |
port = "6667"; | |
}, | |
{ address = "irc.efnet.org"; chatnet = "EFNet"; port = "6667"; }, | |
{ | |
address = "irc.undernet.org"; |
This file contains hidden or 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 setuptools import setup, find_packages | |
setup( | |
name='spriggan', | |
version='0.1', | |
description="this. is. spriggan.", | |
long_description=__doc__, | |
packages=find_packages(), | |
zip_safe=False, | |
install_requires=[ |
This file contains hidden or 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
db_password = "somepassword" | |
mysql_command = "mysql -u root -p#{node[:mysql][:server_root_password]} -e" | |
bash "setup_#{app}_db" do | |
code <<-EOH | |
#{mysql_command} "CREATE DATABASE #{app}" | |
#{mysql_command} "GRANT ALL PRIVILEGES ON #{app}.* \ | |
TO '#{site}'@'localhost' \ | |
IDENTIFIED BY '#{db_password}' \ | |
WITH GRANT OPTION" |