Skip to content

Instantly share code, notes, and snippets.


Ali Sawari AliSawari

View GitHub Profile
m-esm / run.js
Created Feb 22, 2019
Node.js sending and receiving file using only 'http' and 'fs' module (no framework)
View run.js
var http = require("http");
var fs = require("fs");
var server = http.createServer().listen(3000);
server.on("request", function(req, res) {
if (req.method != "POST") return res.end();
var imageName = "received-" + + ".jpg";
var writeStream = fs.createWriteStream(imageName);
akexorcist / index.js
Last active Jan 15, 2021
Axios post method requesting with x-www-form-urlencoded content type
View index.js
const axios = require('axios')
/* ... */
const params = new URLSearchParams()
params.append('name', 'Akexorcist')
params.append('age', '28')
params.append('position', 'Android Developer')
params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=')
params.append('awesome', true)
wangruohui / Install NVIDIA Driver and
Last active Jan 13, 2021
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
View Install NVIDIA Driver and
FrancesCoronel /
Last active Jan 8, 2021
A sample README for all your GitHub projects.


INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

PurpleBooth /
Last active Jan 16, 2021
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


paambaati / upload_demo_html.html
Last active Nov 30, 2020
Uploading files using NodeJS and Express 4
View upload_demo_html.html
<form action="/upload" enctype="multipart/form-data" method="post">
<input type="text" name="title">
<input type="file" name="file">
<input type="submit" value="Upload">
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
sanchitgangwar /
Created Mar 22, 2012
Snakes Game using Python
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
from random import randint
win = curses.newwin(20, 60, 0, 0)
View html5-video-streamer.js
* Inspired by:
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
banksean / mersenne-twister.js
Created Feb 10, 2010
a Mersenne Twister implementation in javascript. Makes up for Math.random() not letting you specify a seed value.
View mersenne-twister.js
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace
so it's better encapsulated. Now you can have multiple random number generators
and they won't stomp all over eachother's state.
If you want to use this as a substitute for Math.random(), use the random()
method like so:
var m = new MersenneTwister();
You can’t perform that action at this time.