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 <stdio.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <unistd.h> | |
int main(int argc, char* argv[]) | |
{ | |
int s; |
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 <stdio.h> | |
#include <fcntl.h> | |
#include <sys/types.h> | |
#include <sys/uio.h> | |
#include <unistd.h> | |
void count_lines(char* filename) | |
{ | |
int fd; | |
int s; |
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
# modified backtrace function (uses core file) courtesy of: | |
# http://blog.cryptomilk.org/2010/12/23/gdb-backtrace-to-file/ | |
bt() | |
{ | |
echo 0 | \ | |
gdb -batch-silent \ | |
-ex "core-file core" \ | |
-ex "set logging overwrite on" \ | |
-ex "set logging file gdb.bt" \ | |
-ex "set logging on" \ |
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 | |
""" | |
encfs-agent | |
Mounts encfs filesystems with passwords generated using private keys stored in ssh-agent. | |
You can have any number of encrypted filesystems ("vaults") under VAULTS_DIR. Password for | |
each of them is derived from its name and given private key stored in ssh-agent. | |
You can use ssh-askpass for ssh-agent if you want. |
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
export PS1='\[\e]0;\u@\h: \w\a\]${prompt_context:+($prompt_context)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\n\$ ' |
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/bash | |
function print_proxy_settings() { | |
echo "$@" | |
networksetup -getwebproxy "$@" | |
echo "" | |
} | |
export -f print_proxy_settings |
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
deb-amd64 http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse | |
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse | |
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse | |
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse | |
deb-amd64 http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse | |
deb-i386 http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse | |
deb-i386 http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse | |
deb-i386 http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse | |
deb-i386 http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse |
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/bash | |
function get_branch { | |
echo $1 | cut -f 3 -d '/' | |
} | |
function die { | |
echo "$@" | |
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
# This is a startup script for IPython. It adds a "line magic" helper that | |
# makes it very easy to run a Twisted reactor in a separate thread. | |
# | |
# This script has been tested in Python 2 and Python 3. | |
# | |
# Author: Mike Pontillo <[email protected]> | |
# | |
# INSTRUCTIONS | |
# ============ | |
# Place this file in: ~/.ipython/profile_default/startup/reactor.py |
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
# -*- coding: utf-8 -*- | |
# IPython startup script version of Gr1N's asyncio-ipython-magic. | |
# To use, place this file in: ~/.ipython/profile_default/startup | |
import ast as _ast | |
import asyncio as _asyncio | |
from IPython.core.magic import Magics, magics_class, cell_magic | |
OlderNewer