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
qemu-system-i386 -enable-kvm -cpu host -m 1024 -device virtio-vga,edid=on,xres=1440,yres=900 -net nic,model=rtl8139 -net user -drive file=winxp.img,format=raw -usb -device qemu-xhci,id=xhci -drive if=none,id=stick,format=raw,file=usb.img -device usb-storage,bus=xhci.0,drive=stick,removable=on -drive file=virtio-win-0.1-94.iso,media=cdrom |
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
ramdisk() { | |
if [ "$1" = "on" ]; then | |
echo creating a 100MB ramdisk: | |
size=$((2 * 1024 * 100)) | |
device_name=$(hdiutil attach -nomount ram://${size} | awk '{print $1}') | |
diskutil eraseVolume HFS+ RAMDisk ${device_name} | |
echo created: /Volumes/RAMDisk | |
elif [ "$1" = "off" ]; then | |
echo "Bye RAMDisk... sure? (control+c abort - INTRO byebye)" | |
read |
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
" Plugins | |
" external tool dependencies: | |
" - ripgrep | |
" - bat | |
" remember: :PlugInstall | |
call plug#begin() | |
Plug 'fatih/vim-go' | |
Plug 'AndrewRadev/splitjoin.vim' | |
Plug 'fatih/molokai' | |
Plug 'scrooloose/nerdtree' |
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 | |
# | |
# You should define BINTRAY_ACCOUNT and BINTRAY_APIKEY here or from the outside | |
# BINTRAY_ACCOUNT is you Bintray account and BINTRAY_APIKEY, API Key generated under your Bintray profile | |
# Redefine following variables to match your own usage | |
BINTRAY_ACCOUNT=vicendominguez | |
BINTRAY_APIKEY=xxxxxxxxxxxxxxxxx |
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/python | |
import fcntl, socket, struct, urllib2 | |
def getHwAddr(ifname): | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', ifname[:15])) | |
return '_'.join(['%02x' % ord(char) for char in info[18:24]]) | |
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 | |
URL="http://gw.url.net:40001/proxy/" | |
ID="$1" | |
MESSAGE="$2" | |
if [ -z "$ID" ] | |
then | |
echo 'ID param not found' |
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 | |
# | |
# chkconfig: - 70 30 | |
# description: latency logging and graphing system | |
# processname: smokeping | |
# Source function library. | |
. /etc/rc.d/init.d/functions | |
# Get config. |
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
#Avoid Poodle | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
#Enable ciphers | |
ssl_prefer_server_ciphers on; | |
ssl_session_cache shared:SSL:10m; | |
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; | |
#ssl_ciphers 'AES128+EECDH:AES128+EDH:!aNULL'; | |
resolver 8.8.4.4 8.8.8.8 valid=300s; | |
resolv |
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
#### CentOS: yum install pip ; pip install linode-python ; pip install chube | |
#### | |
- hosts: localhost | |
connection: local | |
gather_facts: false | |
tasks: | |
- name: Create linode server | |
linode: | |
api_key: '---LINODE-API-KEY-HERE---' |
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 node | |
// sudo npm install linode-api -g | |
// Show distribution list & datacenter list & linode plans | |
var my_api_key = '---KEY-HERE-----'; | |
var client = new(require('linode-api').LinodeClient)(my_api_key); | |
client.call('avail.distributions', {}, function (err, res) { | |
if (err) throw err; | |
console.log(res); |
NewerOlder