Skip to content

Instantly share code, notes, and snippets.

View jahan-addison's full-sized avatar

Jahan Addison jahan-addison

View GitHub Profile

Keybase proof

I hereby claim:

  • I am emilyrose on github.
  • I am nexxy (https://keybase.io/nexxy) on keybase.
  • I have a public key whose fingerprint is 39F6 A0DF 45CB C625 60CC 5ACE 3498 C624 BB33 8352

To claim this, I am signing this object:

@ericelliott
ericelliott / essential-javascript-links.md
Last active June 14, 2025 18:43
Essential JavaScript Links
@gitaarik
gitaarik / git_submodules.md
Last active July 8, 2025 12:04
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@PipelineBaron
PipelineBaron / trait.js
Created December 28, 2013 21:38
js interfaces + services + decorators
var trait = require("../../util/trait");
module.exports = trait("UserServiceInterface", [
"createUser",
"createUserFromForm",
"getUserByEmail",
"authenticateUser",
"authenticateUserFromForm",
"isUserAdmin"
]);
@joechrysler
joechrysler / who_is_my_mummy.sh
Last active May 15, 2025 11:21
Find the nearest parent branch of the current git branch
#!/usr/bin/env zsh
git show-branch -a \
| grep '\*' \
| grep -v `git rev-parse --abbrev-ref HEAD` \
| head -n1 \
| sed 's/.*\[\(.*\)\].*/\1/' \
| sed 's/[\^~].*//'
# How it works:
@Warry
Warry / Article.md
Created December 11, 2012 00:11
How to make faster scroll effects?

How to make faster scroll effects?

  • Avoid too many reflows (the browser to recalculate everything)
  • Use advanced CSS3 for graphic card rendering
  • Precalculate sizes and positions

Beware of reflows

The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 10, 2025 04:31
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@paullewis
paullewis / gist:1981455
Created March 5, 2012 22:03
Quicksort in JavaScript
/**
* An implementation for Quicksort. Doesn't
* perform as well as the native Array.sort
* and also runs the risk of a stack overflow
*
* Tests with:
*
* var array = [];
* for(var i = 0; i < 20; i++) {
* array.push(Math.round(Math.random() * 100));
#!/bin/bash
#
# Homepage: http://www.debian-tutorials.com
# Email: [email protected]
# Bash script to download and install or upgrade wordpress to specified directory.
install_wp ()
{
cd ~</pre>
<!--more-->
<pre>