Skip to content

Instantly share code, notes, and snippets.

$2a$11$E8FlUtDWGIfWWinkWS9c7uXbWa.fINB/55ZuPtb.ed/CivkX9/exa

@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 / 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 / pgp.md
Last active November 18, 2023 19:11
PGP Guide

PGP Guide

GPG vs PGP

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
sepehr / ubuntu-web.md
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

Hostname

@sepehr
sepehr / osx-kong.sh
Last active June 12, 2018 01:54
OSX: Kong Installation
#!/bin/bash
#
# 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
sepehr / malware_cleaner.sh
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
sepehr / svn_commit_amend.sh
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