Skip to content

Instantly share code, notes, and snippets.

View amad's full-sized avatar
🚀
(⌐■_■)

Ahmad Samiei amad

🚀
(⌐■_■)
View GitHub Profile
@amad
amad / elevatorsaga.js
Last active November 22, 2017 11:05
My basic solution for elevatorsaga.com
{
init: function(elevators, floors) {
const lessMoves = false;
var upQueue = [];
var downQueue = [];
moveToFloorNum = (elevator, floorNum, force=false) => {
if (elevator.destinationQueue.includes(floorNum)) {
elevator.goToFloor(floorNum, force);
@amad
amad / cloudSettings
Last active August 8, 2020 10:14
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-08-08T10:13:59.555Z","extensionVersion":"v3.4.3"}
@amad
amad / .tmux.conf
Created November 7, 2017 13:57 — forked from nicolasochem/.tmux.conf
The best tmux and vim configuration in the universe
# Our .tmux.conf file
# Setting the prefix from C-b to C-s
set -g prefix C-s
# Free the original Ctrl-b prefix keybinding
unbind C-b
#setting the delay between prefix and command
set -sg escape-time 1
# Ensure that we can send Ctrl-S to other apps
bind C-s send-prefix
@amad
amad / GIF-Screencast-OSX.md
Created August 2, 2017 19:30 — forked from spicycode/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

<?php
foreach(["9zojk",a2878,aa4nb,b7u9z,chbf3,eze2n,jz6rj,jz6rj,jz6rj,eze2n,cepdr,ako8z,a1pc1]as$v)echo$t=strtr(substr(base_convert($v,36,2),1),10,"* "),"* "[$k++<2],strrev($t),"\n";
for(;$o=ord(kAlgDjAbeDlCcFlCbIiDaWXXXaWbEgJdDgCdBgBgAfA[$i++]);($x+=$s)%24?:print$r.("* "[$k++<2]).strrev($r)."\n".$r="")$r.=strtr(str_repeat($b=+($o>96),$s=$o-64-$b*32),10," *");
gzinflate(base64_decode(U1CAAy0FXECLC8YAAnQNyAJAwIVFIYSPRYgLLkWEYrByLS10WTwiXAgmcYCLRPV00kGyN6BhgB4eyABZjgstyqAsuDpU5YjEgJIOEKoQigE));
// by Erik Wrenholt
import java.util.*;
class Mandelbrot
{
static int BAILOUT = 16;
static int MAX_ITERATIONS = 1000;
private static int iterate(float x, float y)
{
1051541451431641621571721571511441234567881234567812345678123678326470547
2999999259923478990124999995689902993413269916749953349999914649932724997
2994567809912568990139956799809929936781467998299634699818991169966144990
2999994569970124995699801323459999012615302799995324993243699019923412993
2994567801993569980299356780239999456725634569974326992644399243992369936
2994567801992689901239967899029939945745315319931253399436998011992349950
2998012345299999388352999991039953991232012479934673289999982640499999415
@amad
amad / md5_device_fingerprint.js
Created March 10, 2016 05:51 — forked from splosch/md5_device_fingerprint.js
Browser and device fingerprinting - a MD5 checksum generator to identify a device-browser-combination
(function(window, document, JSON){
"use strict";
var SEP = '|', ua, opera, ie;
/*
* Collect Browser & Device Data
*/
var Collector = {
/*
* MD5 Checksum calculation
*/
<canvas></canvas>
<script>
document.addEventListener('touchmove', function (e) {
e.preventDefault()
})
var c = document.getElementsByTagName('canvas')[0],
x = c.getContext('2d'),
pr = window.devicePixelRatio || 1,
w = window.innerWidth,
h = window.innerHeight,
@amad
amad / tmux-cheatsheet.markdown
Last active August 3, 2017 13:41 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

Todo: ctl+b+[ scroll mode

q quit scroll mode

ctl+b ctl+o rotate panes

tmux shortcuts & cheatsheet

start new: