Skip to content

Instantly share code, notes, and snippets.

View arshinalbab's full-sized avatar
🌴
Chilling!

Arshin Albab arshinalbab

🌴
Chilling!
View GitHub Profile
@mikeyk
mikeyk / redis_session_backend.py
Created April 8, 2011 18:01
A redis backend for Django Sessions, tested on Django 1.3+
from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.conf import settings
from django.utils.encoding import force_unicode
import redis
class SessionStore(SessionBase):
""" Redis store for sessions"""
def __init__(self, session_key=None):
self.redis = redis.Redis(
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
<?
require("redis.php");
require("json.php");
$term = $_GET['term'];
$r = new Redis("127.0.0.1","6379");
$r->connect();
$items = $r->zrangebylex("kernel","[$term","[$term\xff",Array("LIMIT","0","10"));
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active March 23, 2026 17:33
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@Kevinlearynet
Kevinlearynet / solr.js
Created December 17, 2014 17:41
Example of using 'solr-client' in Node.js environment
// install solr client package: `npm install solr --save`
var solr = require( 'solr-client' );
// client connects to solr host
var client = solr.createClient({
host : host,
port : port,
core : core,
path : path,
agent : agent,
@johnthillaye
johnthillaye / mean_aws_deployment_process.MD
Last active October 28, 2022 18:03
MEAN.JS Full Stack Deployment Process to AWS EC2

MEAN.JS Full Stack Deployment Process to AWS EC2

Deploy AWS EC2 Instance

###Install & configure AWS CLI tools

$ sudo pip install awscli
$ aws configure
@walm
walm / main.go
Last active September 21, 2025 16:52
Simple Golang DNS Server
package main
import (
"fmt"
"log"
"strconv"
"github.com/miekg/dns"
)
@kocisov
kocisov / next_nginx.md
Last active February 3, 2025 07:27
How to setup next.js app on nginx with letsencrypt
@caseywatts
caseywatts / 0 push to talk.md
Last active December 7, 2025 19:07
Push To Talk - Google Meet Bookmarklet

Short link to this page: http://caseywatts.com/ptt

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Push To Talk in a Google Hangout (Meet)

  1. Save this bookmarklet. Right-click on boomarks toolbar Add Page...
  • Name: PTT (push to talk) or whatever you'd like (maybe short so it stays on your bookmarks toolbar)
@grimzy
grimzy / git-pull-all
Created September 15, 2017 02:15
Git pull all remote branches
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all