Skip to content

Instantly share code, notes, and snippets.

View z3t0's full-sized avatar

Rafi Khan z3t0

View GitHub Profile
@z3t0
z3t0 / asd
Created April 29, 2018 23:35
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDJ4zjIUueE0QNGhFCA77+ODznANyIOtiTlPsLDMpbnTLi5xHFHb/OP9w8wyD32eB83qbzpfow1Kh0MArPb5qCnBl2ziCyzIW33pdzwngJSlVGZmS/Svn8WEMnrRmddxfzRR9F89fQ/+Sx6eQKk3bmpq/r9A9ukgp20Kl3uIWj4RLnVkuyb8fwKGD+3m2UlOxgmiV8HP03Kev9vzv/ZzioRi2zVZv7QmbfhWOFB08L4PWTtqSzkR3pQyDGngorcm95+fWnAAD9rZaA71wTU5Rv9WL7jJ7a0qJ62EHpD0Z+m4guhLjoZ7W3eqcad7n//OxrJ5He3RWdy1zgne7fa9lRN2HI1J8JHCVcNan1NXHNtK012tvomeYce0cIcRPLNILHOAadsBYue1ML8Gaia/fGdx8A/SuUTDg5974lH7B9C54XD4F4u9yURGLK/ls7azMSrKe5c3RfqMZytQXXYKihTxIPWjWpXqOTe71yfp3C1tHLttgeU2C2wEmV0/H0EbjqXdkdzQMPTnvMbrW3y0WwCCB9QGJ9w4QBBGATO0Jwz4IFZLE2FJqh6ZxNfkBNzukpye4L9nYRIEyc2RJwuv9eEsCeBQcCsd6D2+Pk9tYJJqDWFIMiQI1rK9/SFrwQy4BfDS1GoeeQHQOzRuzHrfRR4+sF+c6M5urdjD99cJi2cXQ== zetoslab@gmail.com
@z3t0
z3t0 / Portable Node.js andNPM on windows.md
Created February 4, 2017 05:08 — forked from massahud/Portable Node.js andNPM on windows.md
Portable Node.js and NPM on windows
  1. Get node binary (node.exe) from http://nodejs.org/download/
  2. Create the folder where node will reside and move node.exe to it
  3. Download the last zip version of npm from http://nodejs.org/dist/npm
  4. Unpack the zip inside the node folder
  5. Download the last tgz version of npm from http://nodejs.org/dist/npm
  6. Open the tgz file and unpack only the file bin/npm (without extension) directly on the node folder.
  7. Add the the node folder and the packages/bin folder to PATH
  8. On a command prompt execute npm install -g npm to update npm to the latest version

Now you can use npm and node from windows cmd or from bash shell like Git Bash of msysgit.

➜ IRremote-SIL git:(master) make version
make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
g++ --version
Warning: Opening nnimap server on gmail...failed: ; Unable to open server nnimap+gmail due to: make client process failed: Connection refused, :name, *nnimap*, :buffer, *nnimap localhost nil *nntpd**, :host, localhost, :service, imap; Opening nntp server on news...failed: >>> (file-error make client process failed Network is unreachable :name nntpd :buffer *server news nntp *nntpd** :host news :service nntp); Server nntp+news previously determined to be down; not retrying; Opening nntp server on news...failed: >>> (file-error make client process failed Network is unreachable :name nntpd :buffer *server news nntp *nntpd** :host news :service nntp); Server nntp+news previously determined to be down; not retrying
(defparameter *test-db* nil)
(push (list :name "Bob") *test-db*)
(print *test-db*)
;; ((:NAME "Bob"))
(getf (first *test-db*) :bots)
;; returns nil (as expected)
(setf (getf (first *test-db*) :bots) '(1))
;; returns (1) (as expected)
((:TITLE "Thunder" :ARTIST "Imagine Dragons" :RATING 8 :RIPPED NIL) (:TITLE "Kissing Strangers" :ARTIST " DNCE" :RATING 3 :RIPPED NIL) (:TITLE "You're Such A" :ARTIST "Hailee Steinfeld" :RATING 7 :RIPPED NIL) (:TITLE "Believer" :ARTIST "Imagine Dragons" :RATING 8 :RIPPED NIL) (:TITLE "Speed of Sound" :ARTIST "Cold Play" :RATING 8 :RIPPED NIL) (:TITLE "Demons" :ARTIST "Imagine Dragons" :RATING 10 :RIPPED NIL))
@z3t0
z3t0 / cd.lisp
Last active July 24, 2017 07:59
(defun make-cd (title artist rating ripped) (list :title title :artist artist :rating rating :ripped ripped))
(defvar *db* nil)
(defun add-record (cd) (push cd *db*))
(defun dump-db () (format t "~{~{~a~10t~a~%~}~%~}" *db*))
(defun prompt-read (prompt)
(format *query-io* "~a: " prompt)
if ((*source = malloc(fsize+1)) {
}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// reads text from path to source
void read_file (char path[], char **source) {
FILE *f = fopen(path, "r");
fseek(f, 0, SEEK_END);
long fsize = ftell(f);
questions[0][type]:dropdown
questions[0][questionText]:asd
questions[0][choices][]:asd // ignored
questions[0][choices][]:asdasd
questions[1][type]:dropdown
questions[1][questionText]:
title:
description: