View smartmontools.patch
1 2 3 4 5 6 7 8 9 10
diff --git a/smartmontools b/smartmontools
index 975c018..89feba5 100755
--- a/smartmontools
+++ b/smartmontools
@@ -127,7 +127,7 @@ case "$1" in
fi
;;
status)
- status_of_proc -p $SMARTDPID $SMARTD smartd && exit 0 || exit $?
+ status_of_proc -p $PIDFILE smartd smartd && exit 0 || exit $?
View fast-merge-object.js
1 2 3 4 5 6 7 8 9 10
function subclass(base, child) {
function temp() {}
temp.prototype = base.prototype;
child.prototype = new temp;
}
 
function a(){}
a.prototype = {foo: 'bar'};
 
function b(){}
View inject-requestautocomplete-magento-extension.js
1 2 3 4 5 6 7 8 9 10
(function() {
var host = 'https://rawgit.com/chromium/requestautocomplete-magento-extension/master/';
 
var script = document.createElement('script');
script.src = host + 'js/requestautocomplete/checkout.js';
script.onload = function() { requestAutocomplete.enable(); };
document.documentElement.appendChild(script);
 
var link = document.createElement('link');
link.href = host + 'skin/frontend/base/default/css/requestautocomplete/checkout.css';
View xmonad.hs
1 2 3 4 5 6 7 8 9 10
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
 
myManageHook = composeAll
[ className =? "Gimp" --> doFloat
, className =? "Xmag" --> doFloat
View chromium.gyp_env
1 2 3
{
'GYP_DEFINES': 'chromeos=1 clang=1 component=shared_library'
}
View gist:5708457
1 2 3 4 5 6 7 8 9 10
// ==UserScript==
// @name Refresher and scroller
// @namespace refresh-and-scroll
// @description Refreshes page after 5s and scrolls to 1000px.
// @match https?://yourdomain.com/*
// @version 0.1
// ==/UserScript==
 
window.addEventListener('load', function() {
window.scrollTop = 1000 /* px from the top */;
View find_authors.sh
1 2 3 4 5 6 7 8 9 10
find_authors() {
local locations;
[ $# -eq 0 ] && locations='.' || locations="$@";
for loc in $locations; do
echo "finding top 3 authors for: $loc";
local dir;
[ -d "$loc" ] && dir="$loc" || dir="`dirname "$loc"`";
local vcs;
if [ -d "$dir/.svn" ]; then
find "$loc" -type f | grep -v '\/.svn' | \
View reload.user.js
1 2 3 4 5 6 7 8 9 10
// ==UserScript==
// @name Tree Reloader
// @namespace tree-reloader
// @description Reloads the tree
// @match http://build.chromium.org/*
// @match https://build.chromium.org/*
// @match http://chromegw.corp.google.com/*
// @match https://chromegw.corp.google.com/*
// @match http://chromium-build.appspot.com/*
// @match https://chromium-build.appspot.com/*
View gist:2649716
1 2 3 4 5 6 7 8 9 10
$ cat blah.cc
#include <iostream>
 
int main() {
int i = 0;
if (i || (i = 5))
std::cout << "yay!";
return 0;
}
$ g++ blah.cc
Something went wrong with that request. Please try again.