Skip to content

Instantly share code, notes, and snippets.


sepehr / blockstack.txt
Created December 20, 2017 13:19
Blockstack proof
Verifying my Blockstack ID is secured with the address 19qPLyc5KHs1y6eBSB6JQTBPMTXuWVASce
sepehr / num_endianness.php
Created August 1, 2017 07:08
Change endianness of a decimal number in PHP
* Change endianness of the given decimal number.
* @param int $num
* @return int
function num_endianness($num) {
sepehr / virality-updater-memory-profile.svg
Created June 21, 2017 23:22
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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!
========================================== ==========================================
========================================== ==========================================
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 /
Last active November 18, 2023 19:11
PGP Guide

PGP Guide


PGP can refer to two things:

The Pretty Good Privacy software originally written by Phil Zimmermann, and now owned by Symantec. The formats for keys, encrypted messages and message signatures defined by that software. These have now been formalised as the OpenPGP standard. The GPG software is an independent implementation of the OpenPGP standards, so you can use it to exchange encrypted messages with people using other OpenPGP implementations (e.g. Symantec's PGP).

sepehr /
Last active August 23, 2023 04:28
Webserver recipe for Ubuntu 14.04

Webserver setup recipe for Ubuntu 14.04 LTS

A few notes:

  • All commands should be run as root unless specified otherwise.
  • Commands that sould be run locally have a local$ prefix.

Initial setup


sepehr /
Last active June 12, 2018 01:54
OSX: Kong Installation
# The homebrew formula of kong has a lot of version incompatibilities. So
# we install kong directly from Luarocks.
# Kong only works with Cassandra 2.1.x/2.2.x, the latest brew formula for
# cassandra is 3.x. We need to tap homebrew/versions and install cassandra22
# instead.
sepehr /
Last active November 10, 2015 22:44
PHP/Drupal Malware Remover
# Observe the mess, exclude the unnecessary
# -r: Recursive
# -I: Skip binaries
grep -rI --color "return base64_decode(\\$.*);" /path/to/www/root
# Clean the mess
# -r: Recursice
sepehr /
Last active November 10, 2015 22:45
SVN: Update latest commit message
# Try svn info and replace SVN_REPO_REMOTE_ADDRESS
svn propset --revprop -r {REVISION_NUMBER} --force "svn:log" "NEW_COMMIT_MESSAGE_HERE..." SVN_REPO_REMOTE_ADDRESS