Skip to content

Instantly share code, notes, and snippets.

View aliceinwire's full-sized avatar

Arisu T. aliceinwire

View GitHub Profile
#!/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=""
@aliceinwire
aliceinwire / stdin
Created August 31, 2015 10:37
stdin
root = /
ParseLdSoConf(//etc/ld.so.conf)
glob: //etc/ld.so.conf.d/*.conf
ParseLdSoConf(//etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf)
ParseLdSoConf(//etc/ld.so.conf.d/05binutils.conf)
ldpaths[conf] = ['/lib64', '/usr/lib64', '/usr/local/lib64', '/lib32', '/usr/lib32', '/usr/local/lib32', '/lib', '/usr/lib', '/usr/local/lib', '/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/32', '/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3', '/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/32', '/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4', '/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/32', '/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3', '/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/32', '/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3', '/usr/x86_64-pc-linux-gnu/lib', '/usr/lib32/OpenCL/vendors/nvidia', '/usr/lib64/OpenCL/vendors/nvidia', '/usr/lib32/opengl/xorg-x11/lib', '/usr/lib64/opengl/xorg-x11/lib', '/usr/lib64/qt4', '/usr/games/lib64', '/usr/games/lib32', '/usr/games/lib']
ldpaths[env] = []
argv[x] = /opt/vmware/lib/vmware/bin/vmplayer
+auto-root = /opt
@aliceinwire
aliceinwire / stdin
Created August 31, 2015 10:39
stdin
This file has been truncated, but you can view the full file.
execve("/opt/vmware/lib/vmware/bin/vmplayer", ["/opt/vmware/lib/vmware/bin/vmpla"..., "-H", "", "-U", "root", "-P", ""], [/* 54 vars */]) = 0
brk(0) = 0x7f28fadb5000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f28faadd000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=148874, ...}) = 0
mmap(NULL, 148874, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f28faab8000
close(3) = 0
open("/lib64/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`#\0\0\0\0\0\0"..., 832) = 832
@aliceinwire
aliceinwire / stdin
Created August 31, 2015 10:51
stdin
2015-08-31T19:50:23.126+09:00| vmplayer| I120: Log for VMware Player pid=14169 version=7.1.2 build=build-2780323 option=Release
2015-08-31T19:50:23.126+09:00| vmplayer| I120: The process is 64-bit.
2015-08-31T19:50:23.126+09:00| vmplayer| I120: Host codepage=UTF-8 encoding=UTF-8
2015-08-31T19:50:23.126+09:00| vmplayer| I120: Host is Linux 4.0.5-gentoo01 Gentoo Base System release 2.2
2015-08-31T19:50:23.087+09:00| vmplayer| I120: VTHREAD initialize main thread 4 "vmplayer" pid 14169
2015-08-31T19:50:23.087+09:00| vmplayer| I120: UTIL: Change file descriptor limit from soft 1024,hard 4096 to soft 4096,hard 4096.
2015-08-31T19:50:23.087+09:00| vmplayer| I120: OBJLIB-LIB: Objlib initialized.
2015-08-31T19:50:23.087+09:00| vmplayer| I120: PREF early PreferenceGet(libdir), using default
2015-08-31T19:50:23.095+09:00| vmplayer| I120: PREF early PreferenceGet(libdir), using default
2015-08-31T19:50:23.095+09:00| vmplayer| I120: PREF early PreferenceGet(libdir), using default
@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;
#!/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)