Skip to content

Instantly share code, notes, and snippets.

View toastercup's full-sized avatar
🌈

Garfield Linden toastercup

🌈
View GitHub Profile
@toastercup
toastercup / tddium_post_build.rake
Created December 19, 2013 17:16
Rake task for Tddium: calls redeploy hook for Cloud66 upon successful CI build.
def cmd(c)
system c
end
namespace :tddium do
desc 'post_build_hook'
task :post_build_hook do
return unless ENV['TDDIUM_MODE'] == 'ci'
return unless ENV['TDDIUM_BUILD_STATUS'] == 'passed'
@toastercup
toastercup / websocket_test.js
Created August 13, 2012 19:50
Test gist from Sublime Text 2
function changeTopic(topic) {
console.log((new Date()) + ' The topic was changed to: ' + topic);
var text = htmlEntities(topic);
currentTopic = text;
var json = JSON.stringify({ type:'topic', data: text });
for (var i=0; i < clients.length; i++) {
clients[i].sendUTF(json);
}
@toastercup
toastercup / main.py
Created May 1, 2012 16:27
CSV -> XML
from flask import Flask, views, request, render_template, send_file
import os, csv, codecs
from xml.sax.saxutils import escape
from xml.dom.minidom import Document
#-----------------------------
# App Configuration
class Config:
ALLOWED_EXTENSIONS = set(['txt', 'csv'])
from flask import Flask, views, request, redirect, url_for, render_template, flash, send_from_directory
from werkzeug import secure_filename
import os, csv
from xml.sax.saxutils import escape
UPLOAD_FOLDER = '/home/atharp/uploads'
ALLOWED_EXTENSIONS = set(['txt', 'csv'])
SECRET_KEY = 'super_secret_encoding_string!'
app = Flask(__name__)
from flask import Flask, views, request, redirect, url_for, render_template, flash, send_from_directory
from werkzeug import secure_filename
import os, csv
from xml.sax.saxutils import escape
UPLOAD_FOLDER = '/home/atharp/uploads'
ALLOWED_EXTENSIONS = set(['txt', 'csv'])
SECRET_KEY = 'super_secret_encoding_string!'
app = Flask(__name__)
[root@aegis ~]# pacman -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
:: The following packages should be upgraded first :
pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n] Y