Skip to content

Instantly share code, notes, and snippets.

View mohebifar's full-sized avatar
🙃

Mohamad Mohebifar mohebifar

🙃
View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@paulmillr
paulmillr / active.md
Last active June 10, 2024 18:10
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active April 30, 2024 19:21
5 entertaining things you can find with the GitHub Search API
@jedi4ever
jedi4ever / nodejs-cluster-zero-downtime.md
Last active February 11, 2024 13:45
nodejs clustering, zero downtime deployment solutions

Clustering: The basics

The trick? pass the file descriptor from a parent process and have the server.listen reuse that descriptor. So multiprocess in their own memory space (but with ENV shared usually)

It does not balance, it leaves it to the kernel.

In the last nodejs > 0.8 there is a cluster module (functional although marked experimental)

@brockpalen
brockpalen / qselect-qdel.sh
Last active January 3, 2017 17:25
qselect-samples
#delete all my jobs,
# only do this if you have fewer than a few hundred jobs.
qdel $(qselect -u $USER)
#delete all my queued jobs
qdel $(qselect -u $USER -s Q)
#delete all my jobs submiting with the wrong account
qdel $(qselect -u $USER -A wrongaccount)
@qwtel
qwtel / WebGLRenderingContext.js
Last active August 29, 2015 14:03
Outline and JSDoc of the WebGLRenderingContext. Based on the WebGL 1.0 API Quick Reference Card http://www.khronos.org/files/webgl/webgl-reference-card-1_0.pdf. Can be used for autocompletion in WebStorm / IntelliJ.
/**
* @constructor
*/
function WebGLRenderingContext() {
}
WebGLRenderingContext.prototype = {
ACTIVE_ATTRIBUTES: 35721,
ACTIVE_TEXTURE: 34016,
ACTIVE_UNIFORMS: 35718,
@dynamicguy
dynamicguy / install-opencv-2.4.11-in-ubuntu.sh
Last active April 3, 2024 20:20
install opencv-2.4.11 in ubuntu
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev
@jryans
jryans / devtools-39.md
Last active August 29, 2015 14:18
Drag Elements, Console History, and more – Firefox Developer Edition 39

Quite a few big new features, improvements, and bug fixes made their way into Firefox Developer Edition 39. Update your Firefox [Developer Edition][dev-ed], or [Nightly][nightly] builds to try them out!

Inspector

The [Inspector][inspector] now allows you to move elements around via [drag and drop][dnd]. Click and hold on an element and then drag it to where you want it to go. This feature was added by contributor Mahdi Dibaiee.

[![Drag and Drop][dnd-poster]][dnd-video]

Back in [Firefox 33][fx33], a tooltip was added to the rule view to allow editing curves for cubic bezier CSS animations. In Developer Edition 39, we've greatly enhanced the tooltip's UX by adding various standard curves you can try right away, as well as cleaned up the overall appearance. This was added by new contributor John Giannakos.

@hallaji
hallaji / README.markdown
Last active August 9, 2017 02:49
Iranian National Identifier Validator

Iranian National Identifier Validator

A validator for Iranian (Persian) national identifier or social number

Languages

c#, java, javascript, php

Types

parameter: string (It doesn't support arabic or persian numbers)
return: boolean

// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1