Skip to content

Instantly share code, notes, and snippets.

View bdx0's full-sized avatar

Dương Bảo Duy bdx0

View GitHub Profile
@bdx0
bdx0 / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

What

Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.

What are we using? What do you need?

  • An active AWS account. First time sign-ups are eligible for the free tier for a year
  • One Micro Tier EC2 Instance
  • With AWS we will use the stock Ubuntu Server AMI and customize it.
  • Anaconda for Python.
  • Coffee/Beer/Time

Cloud computing

Computing service

IPython

Sagemath

@bdx0
bdx0 / ipython_forward.md
Last active August 29, 2015 14:23
Something for ipython
@bdx0
bdx0 / ipc.py
Last active August 29, 2015 14:23 — forked from dankrause/ipc.py
import SocketServer
import socket
import struct
import json
class IPCError(Exception):
pass
class UnknownMessageClass(IPCError):
@bdx0
bdx0 / vim_cheatsheet.md
Last active August 29, 2015 14:27 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@bdx0
bdx0 / menu_launcher.py
Created December 24, 2016 17:06 — forked from abishur/menu_launcher.py
A simple menu system using python for the Terminal (Framebufer)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Topmenu and the submenus are based of the example found at this location http://blog.skeltonnetworks.com/2010/03/python-curses-custom-menu/
# The rest of the work was done by Matthew Bennett and he requests you keep these two mentions when you reuse the code :-)
# Basic code refactoring by Andrew Scheller
from time import sleep
import curses, os #curses is the interface for capturing key presses on the menu, os launches the files
screen = curses.initscr() #initializes a new window for capturing key presses
curses.noecho() # Disables automatic echoing of key presses (prevents program from input each key twice)
@bdx0
bdx0 / stuns
Created January 22, 2017 17:10 — forked from zziuni/stuns
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@bdx0
bdx0 / Social.md
Created January 8, 2018 15:22 — forked from derofim/Social.md
Cocos 2d js game resources
@bdx0
bdx0 / script_1x2x3x.sh
Created January 12, 2018 03:24 — forked from sag333ar/script_1x2x3x.sh
Generate 1x 2x 3x images from supplied 3x assets. Following shell-script can be used for iOS Asset catalogue.
for f in *.png
do
# Process to get File Name & 2x, 3x file names
xNAME=`echo "$f" | cut -d'.' -f1`
cp "$f" "$xNAME@3x.png"
cp "$f" "$xNAME@2x.png"
# Set proper resolution to original file
sips -s dpiHeight 72.0 -s dpiWidth 72.0 "$f"