Skip to content

Instantly share code, notes, and snippets.

View ahmadnassri's full-sized avatar

Ahmad Nassri ahmadnassri

View GitHub Profile
@nijikokun
nijikokun / getResponseHeaderObject.js
Last active August 29, 2015 14:15
Extend XMLHttpRequest to get a key-value object by parsing getAllResponseHeaders
/**
* Parses XMLHttpRequest getAllResponseHeaders into a key-value map
*/
function getResponseHeaderObject (xhrObject) {
var headers = xhrObject.getAllResponseHeaders()
var list = {}
var pairs
if (!headers) {
return list
@nijikokun
nijikokun / t.js
Created November 3, 2011 01:27
<= (chars 140) Javascript
// t (in CoffeeScript)
//
// Description: Quick Templating, optional customizing open/closing tags
//
// Author: Nijikokun <nijikokun@gmail.com>
//
// Usage:
//
// t('Hello {name}!', { name: 'World' });
//
@nijikokun
nijikokun / Retinafy.md
Created July 24, 2012 01:42
Retinafy your site, a free book

Retinafy Your Site / Device

By Nijiko Yonskai

=====

I made a book, its one page.

Table Of Contents

@soofaloofa-zz
soofaloofa-zz / On choosing a hypermedia type
Last active October 14, 2023 07:23
On choosing a hypermedia type for your API - HAL, JSON-LD, Collection+JSON, SIREN, Oh My!
A comparison of Collection+JSON, HAL, JSON-LD and SIREN media types.
Discussion at
http://sookocheff.com/posts/2014-03-11-on-choosing-a-hypermedia-format/
@postpostscript
postpostscript / replify
Last active November 7, 2024 02:47
replify - Create a REPL for any command
#!/bin/sh
command="${*}"
printf "Initialized REPL for `%s`\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
do
eval "$command $input"
printf "%s> " "$command"
@Katorthoma
Katorthoma / AdvancedWindowSnap.ahk
Last active April 19, 2025 18:27
Advanced Window Snap is a script for AutoHotKey that expands upon Windows built-in window-snapping hotkeys.
/**
* Advanced Window Snap
* Snaps the Active Window to one of nine different window positions.
*
* @author Andrew Moore <andrew+github@awmoore.com>
* @version 1.0
*/
/**
* SnapActiveWindow resizes and moves (snaps) the active window to a given position.
@mzabriskie
mzabriskie / README.md
Last active December 18, 2025 23:35
Check git status of multiple repos

If you're like me you have a dir like ~/Workspace/Github where all your git repos live. I often find myself making a change in a repo, getting side tracked and ending up in another repo, or off doing something else all together. After a while I end up with several repos with modifications. This script helps me pick up where I left off by checking the status of all my repos, instead of having to check each one individually.

Usage:

git-status [directory]

This will run git status on each repo under the directory specified. If called with no directory provided it will default to the current directory.

@thibaultcha
thibaultcha / about.md
Last active January 16, 2026 21:08
Irssi setup

Irssi setup in 3 minutes

  1. Install irssi:
  1. Install the script manager (usefull to manage other scripts):
@selfawaresoup
selfawaresoup / uconsole.md
Last active July 7, 2026 19:25
Notes for Clockwork uConsole setup

uConsole Notes

Batteries

I use two XTAR 16850-3500 cells and I get about 8h of active usage out of them.

Get GNOME Shell and GDM3

sudo apt install gnome-shell gdm3
@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active August 5, 2026 20:07
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe