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
# run via | |
# curl https://gist.github.com/chris-rock/7422367/raw/5e55945ec3c0fa16d87d987a8381246307bc1ce7/nodejs.sh | sudo bash | |
echo "install preconditions" | |
apt-get update | |
apt-get install -y python-software-properties python g++ make | |
# for ubuntu quantal | |
apt-get install -y software-properties-common |
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
# mysql dump import | |
mysql -u root -p -h localhost | |
mysql> create database dbname; | |
mysql -u root -p -h localhost dbname < dbdump.sql |
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
apt-get update && apt-get install -y python-software-properties python g++ make && add-apt-repository -y ppa:chris-lea/node.js && apt-get update && apt-get install -y nodejs | |
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
"use strict"; | |
var assert = require('assert'); | |
var crypto = require('crypto'); | |
var Buffer = require('buffer').Buffer; | |
var SECRET_KEY = "ChuckN0rrisL1kesPur3D3PapaSuperKey"; | |
var ENCODING = 'hex'; | |
//var ALGORITHM = "des-ede3-cbc"; | |
var ALGORITHM = "aes256"; |
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 ubuntu:precise | |
MAINTAINER Christoph Hartmann "[email protected]" | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
# compile logstash forwarder | |
RUN apt-get install -y wget git | |
RUN wget --no-check-certificate https://go.googlecode.com/files/go1.1.1.linux-amd64.tar.gz | |
RUN tar -C /usr/local -xzf go1.1.1.linux-amd64.tar.gz |
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
git filter-branch --index-filter 'git rm --cached --ignore-unmatch -- file/*.txt' --prune-empty -- --all |
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
for i in *.mp4; do ffmpeg -i $i -q:a 0 -map a mp3/$i.mp3; 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
git filter-branch --commit-filter 'git_commit_non_empty_tree "$@"' HEAD |
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
# download the first 100 items | |
# if you need more, change the page | |
http https://api.github.com/repos/:user/:repo/issues\?state\=all\&page\=4\&per_page\=100 'Content-Type:application/json' 'Authorization:token yourtoken' > backup01.json |
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
package com.lollyrock.auth | |
import java.util.Locale | |
import javax.servlet.http.{HttpServletResponse, HttpServletRequest} | |
import com.sun.jersey.core.util.Base64 | |
import org.scalatra.auth.strategy.{BasicAuthStrategy, BasicAuthSupport} | |
import org.scalatra.auth.{ScentryStrategy, ScentrySupport, ScentryConfig} | |
import org.scalatra.{Unauthorized, ScalatraBase} |
OlderNewer