Skip to content

Instantly share code, notes, and snippets.

@sepehr
sepehr / blockstack.txt
Created December 20, 2017 13:19
Blockstack proof
Verifying my Blockstack ID is secured with the address 19qPLyc5KHs1y6eBSB6JQTBPMTXuWVASce https://explorer.blockstack.org/address/19qPLyc5KHs1y6eBSB6JQTBPMTXuWVASce
@sepehr
sepehr / desc
Last active September 7, 2017 11:59
Shell: Man a single option
#!/bin/bash
# Print information about a single option or command
# http://svn.mikelward.com/svn/scripts/desc
# Example Usage:
# opt bash continue
# opt rsync -v
scriptname=desc
@sepehr
sepehr / num_endianness.php
Created August 1, 2017 07:08
Change endianness of a decimal number in PHP
<?php
/**
* Change endianness of the given decimal number.
*
* @param int $num
*
* @return int
*/
function num_endianness($num) {
@sepehr
sepehr / virality-updater-memory-profile.svg
Created June 21, 2017 23:22
virality-updater-memory-profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sepehr
sepehr / tmux.cheat
Created January 22, 2017 11:23 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@sepehr
sepehr / hacks.css
Created August 16, 2012 15:49
CSS: Selector Hacks
/**
* CSS Selector Hacks.
*/
/* IE6 and below */
* html #uno { color: red }
/* IE7 */
*:first-child+html #dos { color: red }
@sepehr
sepehr / gdipp_setting.xml
Last active July 5, 2016 10:06
Custom GDIPP Settings
<?xml version="1.0" encoding="UTF-8" ?>
<gdipp>
<version>0.9.1</version>
<gdimm>
<process>
<freetype>
<cache_max_faces>32</cache_max_faces>
<cache_max_sizes>32</cache_max_sizes>
<cache_max_bytes>4194304</cache_max_bytes>
@sepehr
sepehr / tsv2csv.py
Last active February 4, 2016 16:48
Python: Bulk convert .tsv to .csv
#!/usr/bin/python
import glob
import csv
import sys
import os
# Check args
if len(sys.argv) < 2:
sys.exit('Usage: tsv2csv.py /path/to/dir')
@sepehr
sepehr / lcdhype-asus-g50-g70.txt
Last active January 19, 2016 03:20
LCDHype script for Asus G50/G70 LCDs.
#Header
%KeyInit()
%Param.AvoidPluginCleanUp()
%Common.SetPriority(140)
%Graph.SetTextArea(0,0,255,31)
%Graph.Font('OCR-A',10,1)
%DefVar(xPos,Local=105)
%DefVar(yPos,Local=16)
%DefVar(an=0)
%DefVar(km,Global)
@sepehr
sepehr / Default(OSX).txt
Last active January 19, 2016 03:18
Sublime Settings
[
{ "keys": ["ctrl+super+a"], "command": "alignment" },
{ "keys": ["ctrl+super+f"], "command": "reindent", "args": {"single_line": false}},
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" },
{ "keys": ["super+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
]