Notes from Advanced Python Workshop conducted on 24th - 26th May 2013 in Bangalore.
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
import os | |
import signal | |
import sys | |
import select | |
import errno | |
from jsonrpclib.SimpleJSONRPCServer import SimpleJSONRPCServer | |
# BOOK-KEEPING | |
_PIDS = [] |
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
sudo ip addr flush dev br-ex | |
sudo sysctl -w net.ipv4.ip_forward=1 | |
sudo ip addr add 172.24.4.225/28 dev br-ex | |
sudo ip link set br-ex up | |
sudo route add -net 10.0.0.0/24 gw 172.24.4.226 | |
sudo service rabbitmq-server start | |
sudo service postgresql start | |
sudo service apache2 start | |
export SERVICE_TOKEN=password | |
export OS_TENANT_NAME=demo |
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
<style> | |
@font-face { | |
font-family: "Computer Modern"; | |
src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf'); | |
} | |
div.cell{ | |
width:800px; | |
margin-left:16% !important; | |
margin-right:auto; | |
} |
- Related Setup: https://gist.github.com/hofmannsven/6814278
- Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
- Interactive Beginners Tutorial: http://try.github.io/
- Git Cheatsheet by GitHub: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
Press minus + shift + s
and return
to chop/fold long lines!
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
/* | |
* CC=/opt/gcc-5.1.0/bin gcc -m64 -o getdefaultproj -Wall -lproject getdefaultproj.c | |
*/ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <project.h> | |
struct project proj; |
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
/* | |
* File: fanotify-example.c | |
* Date: Fri Nov 15 14:55:49 2013 | |
* Author: Aleksander Morgado <aleksander@lanedo.com> | |
* | |
* A simple tester of fanotify in the Linux kernel. | |
* | |
* This program is released in the Public Domain. | |
* | |
* Compile with: |
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
Disable vim automatic visual mode on mouse select | |
issue: :set mouse-=a | |
add to ~/.vimrc: set mouse-=a | |
my ~/.vimrc for preserving global defaults and only changing one option: | |
source $VIMRUNTIME/defaults.vim | |
set mouse-=a |
OlderNewer