Skip to content

Instantly share code, notes, and snippets.

Sepehr Lajevardi sepehr

Block or report user

Report or block sepehr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am sepehr on github.
  • I am sepehr (https://keybase.io/sepehr) on keybase.
  • I have a public key whose fingerprint is B13F 8023 A527 3067 D580 DA0F 59ED 63FF F9C3 014D

To claim this, I am signing this object:

@sepehr
sepehr / blockstack.txt
Created Dec 20, 2017
Blockstack proof
View blockstack.txt
Verifying my Blockstack ID is secured with the address 19qPLyc5KHs1y6eBSB6JQTBPMTXuWVASce https://explorer.blockstack.org/address/19qPLyc5KHs1y6eBSB6JQTBPMTXuWVASce
@sepehr
sepehr / num_endianness.php
Created Aug 1, 2017
Change endianness of a decimal number in PHP
View num_endianness.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 Jun 21, 2017
virality-updater-memory-profile
View virality-updater-memory-profile.svg
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 Jan 22, 2017 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
View tmux.cheat
========================================== ==========================================
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 Mar 21, 2019
PGP Guide
View pgp.md

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 Jul 3, 2017
Webserver recipe for Ubuntu 14.04
View ubuntu-web.md

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 Jun 12, 2018
OSX: Kong Installation
View osx-kong.sh
#!/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 Nov 10, 2015
PHP/Drupal Malware Remover
View malware_cleaner.sh
# 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 Nov 10, 2015
SVN: Update latest commit message
View svn_commit_amend.sh
# 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
You can’t perform that action at this time.