Skip to content

Instantly share code, notes, and snippets.

View aliceinwire's full-sized avatar

Arisu T. aliceinwire

View GitHub Profile
@aliceinwire
aliceinwire / mosh-cygwin
Created June 5, 2012 22:25 — forked from eerohele/mosh-cygwin.md
Compiling Mosh from git (http://mosh.mit.edu/) under Cygwin
1. Download Cygwin: http://www.cygwin.com
2. Run setup.exe and install the following packages in addition to the default ones:
- make
- boost
- libncurses-devel
- pkg-config
- perl
3. Download and compile Protocol Buffers: http://code.google.com/p/protobuf/
@aliceinwire
aliceinwire / zabbix-2.0.3-dnsapi.patch
Created November 21, 2012 09:26
zabbix-2.0.3-dnsapi.patch
--- zabbix-2.0.3.orig/src/libs/zbxsysinfo/common/net.c 2012-11-05 07:04:04.450140996 +0900
+++ zabbix-2.0.3/src/libs/zbxsysinfo/common/net.c 2012-11-16 13:19:28.057641634 +0900
@@ -215,6 +215,8 @@ static int dns_query(const char *cmd, co
PDNS_RECORD pQueryResults, pDnsRecord;
LPTSTR wzone;
char tmp2[MAX_STRING_LEN];
+ static HMODULE dnsapi_dllHandle = NULL;
+ static void (WINAPI *DnsRecordListFree_dyn)(PDNS_RECORD, DNS_FREE_TYPE) = NULL;
#else
char *name;
@aliceinwire
aliceinwire / new_gist.py
Created November 28, 2012 07:40
Python: take input from stdin and create a new public gist with it
#!/usr/bin/env python
import getpass, mechanize, optparse, os.path, sys
parser = optparse.OptionParser()
parser.add_option('--login')
parser.add_option('--password')
parser.add_option('--filename')
parser.add_option('--description')
parser.add_option('--private', action='store_true', default=False)
#!/usr/bin/env python
import getpass, mechanize, optparse, os.path, sys
parser = optparse.OptionParser()
parser.add_option('--login')
parser.add_option('--password')
parser.add_option('--filename')
parser.add_option('--description')
parser.add_option('--private', action='store_true', default=False)
# Zach Champion
# Calculus II - Honors Calculus Project
# A script in Python that returns a decimal expansion of pi using the
# Gauss-Legendre algorithm.
from __future__ import with_statement
# Used the decimal module for increased accuracy that the standard float
import argparse
import ConfigParser
conf_parser = argparse.ArgumentParser(
# Turn off help, so we print all options in response to -h
add_help=False
)
conf_parser.add_argument("-c", "--conf_file",
help="Specify config file", metavar="FILE")
args, remaining_argv = conf_parser.parse_known_args()
#!/usr/bin/env python
## -*- coding: utf-8 -*-
##
## Copyright (C) 2014 - Alice Ferrazzi - http://twitter.com/aliceinwire
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2
owFtkntQFVUcxy/II59B4JgKA6yIk7z2vWdBI0m0h0lMICrQ5ezuWVi53r3ce3kK
kaWUk6YREEagDKgpGRMyyPXBxEANkjAyjQJpOgMmoo4EZDQY2a7pRDOdv87j+/ue
7+f8zoH5swzOTpsCjjYWg9wlTj+MCIb4ut6BHZigSnlYxA5MNCnIbNdnZrgdYRFY
BsoToA2FKaq/WZVQ2Dab/xNNCJaNrDZFNWsqPIwLo7DCEF2uF8uKOQ1ZLVZF98JI
RCMcMCzNEiLOAIagKFameZZhSQKyAglYCnCAgJplumqz/+dW7LGnUZG0XV2/ho1+
ql+jnWU9PpAoSEgML/MskgHJCwwHScSIlAgJgUE4rgttyPoECZoUEcl62u3ImmFC
RquqPkYW7YouIGgS5wHH04yWB9rSdQJASQAXZQkSgBIEmockDjgB0ByUWUhJEIgc
#!/bin/sh
# This script is meant to be run as a cron job to update a gentoo system automatically
set -e
GA_LOGFILE="/var/log/euscan-check.log"
# which package to monitor divided by space
PACKAGE=""