Skip to content

Instantly share code, notes, and snippets.

View ehzawad's full-sized avatar
Wasteland Baby!

Emrul Hasan Zawad ehzawad

Wasteland Baby!
View GitHub Profile
readnum macro num
push ax
push dx ;pushing ax,dx in stack to keep the previous values
mov ah, 01h ;read character function
int 21h ;execute the function
printstring macro msg
mov ah, 09h
mov dx, offset msg
int 21h
readnum macro num
ehzawad / .eslintrc
Created March 17, 2016 11:46 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
ehzawad / gulpfile.js
Created March 17, 2016 21:54 — forked from wesbos/gulpfile.js
FAST Browserify + Reactify + Babelify
// Update: Hey Folks - I've got a full Gulpfile with everything else over at
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var babelify = require('babelify');
var watchify = require('watchify');
var notify = require('gulp-notify');
ehzawad / hex to binary.asm
Created March 20, 2016 17:51 — forked from SohanChy/hex to binary.asm
Convert single char Hex input to Binary in assembly code - intel 8086
.model small
.stack 100h
countOne db ?
countZero db ?
nln db 0ah,0dh,'$'
msg1 db 'Number of Ones: $'
msg2 db 0ah,0dh,'Number of Twos: $'
main proc
ehzawad / tmux-cheatsheet.markdown
Created March 26, 2016 19:30 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
ehzawad / binary-tricks.asm
Created April 18, 2016 19:37 — forked from SohanChy/binary-tricks.asm
binary tricks on numbers
.model small
.stack 100h
str1 db 'Ones :$'
str2 db ' zero :$'
ones db '0'
zeros db '0'
main proc
ehzawad / slim-redux.js
Created May 24, 2016 11:05 — forked from gaearon/slim-redux.js
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
ehzawad / .gdbinit
Created October 3, 2016 16:42 — forked from skyscribe/.gdbinit
GDB init file to print STL containers and data members
# STL GDB evaluators/views/utilities - 1.03
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file
ehzawad /
Created January 6, 2017 16:48 — forked from JeffPaine/
Transforming Code into Beautiful, Idiomatic Python: notes from Raymond Hettinger's talk at pycon US 2013. The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]: