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 python3 | |
import subprocess | |
import sys | |
def main(argv): | |
print(subprocess.getoutput("pg_ctl -D /var/lib/pgsql/data -l logfile start")) | |
try: | |
tail = subprocess.Popen(["tail", "-F", "logfile"], stdout=sys.stdout) |
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
A: Trim the message, leaving appropriate context, then reply below. | |
Q: How should I reply to email then? | |
A: No. | |
Q: Should I include quotations after my reply? | |
A: Because it messes up the order in which people normally read text. | |
Q: Why is top-posting such a bad thing? | |
A: Top-posting. | |
Q: What is the most annoying thing in email? |
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
#!/bin/sh | |
BASE=/sys/class/backlight/ | |
FILE=/brightness | |
INTEL="${BASE}intel_backlight${FILE}" | |
NVIDIA="${BASE}nv_backlight${FILE}" | |
if [ -f "$INTEL" ]; then | |
echo $((4437 * $1 / 100)) > "$INTEL" | |
elif [ -f "$NVIDIA" ]; then | |
echo $1 > "$NVIDIA" |
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
;;; rfcview.el -- view IETF RFCs with readability-improved formatting | |
;; Copyright (C) 2001-2002 Neil W. Van Dyke | |
;; Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc. | |
;; (mods by Dave Love <fx@gnu.org>) | |
;; Author: Neil W. Van Dyke <neil@neilvandyke.org> | |
;; Author: Dave Love <fx@gnu.org> | |
;; Version: 0.13 | |
;; X-URL: http://www.loveshack.ukfsn.org/emacs/rfcview.el |
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
#!/bin/sh | |
sml -Cprint.depth=10000 -Cprint.length=10000 -Cprint.string-depth=10000 $@ |
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
#include <fcntl.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
int main(int argc, char *argv[]) { | |
if (argc < 2) { |
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
;;; asm-mode.el --- mode for editing assembler code | |
;; Copyright (C) 1991, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 | |
;; Free Software Foundation, Inc. | |
;; All other changes in the public domain. | |
;; Author: Eric S. Raymond <esr@snark.thyrsus.com> | |
;; Author: Robbie Harwood (frozencemetery) <rharwood@club.cc.cmu.edu> | |
;; Maintainer: FSF |
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
/* tested with --std=c99 and --std=gnu99 using gcc 4.7.2 and clang 3.0 */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#define ERROR(...) \ | |
do { \ | |
fprintf(stderr, __VA_ARGS__); \ | |
fflush(stdout); \ | |
exit(1); \ |
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
#!/bin/sh | |
if [ $# != 2 ]; then | |
echo -n "syntax is: " | |
echo -n "$_" | |
echo "<file> <host>" | |
else | |
file="$1" | |
host="$2" | |
scp $file ${host}:/tmp |
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
main(){while(malloc(9));} |