Skip to content

Instantly share code, notes, and snippets.

View gorakhargosh's full-sized avatar

Yesudeep Mangalapilly gorakhargosh

View GitHub Profile
@gorakhargosh
gorakhargosh / mutual-recursion.js
Last active October 8, 2015 21:30
How to interleave 10 and 9 (while also causing a stack overflow). Code only works in language that has function hoisting.
a(10, 1);
function a(n, steps) {
console.log(n, steps);
if (n == 1) {
return 0;
}
return b(n - 1, steps+1);
}
@gorakhargosh
gorakhargosh / newprime.asm
Last active October 8, 2015 13:06
November 30, 2005 - Program for Divya Nayudu when she was doing her MCA.
;program to check whether no is prime or not
.model small
.386
.stack 100h
include newmac.inc
.data
Sign DB 0
M32768 DB "-32768$"
; PROGRAM TO GET FIRST N NO OF PRIMES
;including the macro file
include macros.inc
data segment
cr equ 0dh ;ASCII code for carriage return
lf equ 0ah ;ASCII code for line feed
;printing a string
prints macro str
push ax
push bx
push cx
push dx
push si
mov ah,09h
lea dx,str
int 21h
;start the program
start macro
mov ax,@data
mov ds,ax
endm start
;clearing the screen
clrscr macro
push ax
push bx
goog.object.set(diff, property, appkit.object.difference(a[property],
b[property],
equalsFn));
// Not the same as above! WTF.
innerDiff = appkit.object.difference(a[property],
b[property],
equalsFn);
import re
css_source = """
@import url("../something.css");
@import url(../something.css);
@import url(/some/url.css);
/* @import url(/some/url.css); */
body {
import re
css_source = """
@import url("../something.css");
@import url(../something.css);
@import url(/some/url.css);
body {
background-image: url("images/file.png");
git(b:clean) $ git grep "main.css"
presentation/BUILD:# Get the compiled and combined main.css file.
presentation/BUILD: outs = ['html/static/css/main.css'],
presentation/html/static/styles/.gitignore:main.css
presentation/html/static/styles/local-build.sh:squeeze cssembed main.y.css -o main.css
presentation/html/templates/base.html: <link type="text/css" rel="stylesheet" media="screen" href="/static/css/main.css" />
# See these lines.
presentation/html/templates/project/project_attachment_add.html:<link type="text/css" rel="stylesheet" media="screen" href="/static/default_theme/css/main.css" />
presentation/html/templates/project/project_stats_load.html: <link type="text/css" rel="stylesheet" media="screen" href="/static/default_theme/css/main.css" />
Debugger entered--Lisp error: (void-function ido-init-completion-maps)
ido-init-completion-maps()
smex-initialize-ido()
smex-initialize()
eval-buffer(#<buffer *load*<2>> nil "/home/yesudeep/.emacs.d/elpa/starter-kit-2.0.3/starter-kit-autoloads.el" nil t) ; Reading at buffer posit$
load-with-code-conversion("/home/yesudeep/.emacs.d/elpa/starter-kit-2.0.3/starter-kit-autoloads.el" "/home/yesudeep/.emacs.d/elpa/starter-kit-2.$
load("/home/yesudeep/.emacs.d/elpa/starter-kit-2.0.3/starter-kit-autoloads" nil t)
package-activate-1(starter-kit [(2 0 3) ((paredit (22)) (idle-highlight-mode (1 1 1)) (find-file-in-project (3 0)) (smex (1 1 1)) (ido-ubiquitou$
package-activate(starter-kit (2 0 3))
package-initialize()