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
def app_path | |
unless @app_path | |
git_root = `git rev-parse --show-toplevel`.chomp | |
@app_path = $?.success? ? git_root : Dir.pwd | |
end | |
@app_path | |
end | |
class Exception |
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
#!/usr/bin/env python2 | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
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
SELECT procpid as pid, | |
usename as user, | |
datname as db, | |
application_name as app, waiting as wait, current_query as query | |
FROM pg_stat_activity | |
WHERE datname <> 'postgres'; |
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
const int c = 261; | |
const int d = 294; | |
const int e = 329; | |
const int f = 349; | |
const int g = 391; | |
const int gS = 415; | |
const int a = 440; | |
const int aS = 455; | |
const int b = 466; | |
const int cH = 523; |
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
du -chd1 -t1G | |
# include grand total, friendly sizes, max depth 1, greater than 1G |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace TemplateFoo | |
{ | |
class Program | |
{ |
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
# given the structure | |
../foo/bar | |
../fizz/bang | |
../beep | |
# move into the beep child dir and run the command | |
cd beep | |
find ../ -mindepth 1 -type d -printf "%P\0" | xargs --null mkdir | |
# now beep has the same structure | |
./foo/bar | |
./fizz/bang |
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
MAKEDEV.i686 3.24-6.6.amzn1 installed | |
PyYAML.i686 3.09-5.5.amzn1 installed | |
acl.i686 2.2.49-4.8.amzn1 installed | |
acpid.i686 1.0.10-2.1.6.amzn1 installed | |
alsa-lib.i686 1.0.21-3.8.amzn1 installed | |
apr.i686 1.3.9-3.8.amzn1 @amzn-main | |
apr-devel.i686 1.3.9-3.8.amzn1 @amzn-main | |
apr-util.i686 1.3.9-3.9.amzn1 @amzn-main | |
apr-util-ldap.i686 1.3.9-3.9.amzn1 |
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
[color] | |
ui = true | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold |
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
// Establishing routes | |
<script type="text/javascript"> | |
Notes.Router.map(function () { | |
this.resource('notes', {path: "/"}, function() { | |
this.route('note', {path: "/note/:note_id"}); | |
}); | |
}); | |
Notes.NotesRoute = Ember.Route.extend({ | |
// Note here where we are "setting the subject for the index action" |
OlderNewer