Skip to content

Instantly share code, notes, and snippets.

View roguesherlock's full-sized avatar
:shipit:

Akash roguesherlock

:shipit:
View GitHub Profile
@roguesherlock
roguesherlock / twilight.dark.json
Last active February 22, 2018 13:38
A modified Twilight Light/Dark Console Scheme for Windows to be used with concfg (https://github.com/lukesampson/concfg)
{
"black": "#1e1e1e",
"dark_blue": "#7587a6",
"dark_green": "#8f9d6a",
"dark_cyan": "#afc4db",
"dark_red": "#cf6a4c",
"dark_magenta": "#9b859d",
"dark_yellow": "#f9ee98",
"gray": "#c3c3c3",
"dark_gray": "#323537",

Keybase proof

I hereby claim:

  • I am atomicnumber1 on github.
  • I am atomicnumber1 (https://keybase.io/atomicnumber1) on keybase.
  • I have a public key whose fingerprint is A56E 3583 8509 8BD7 B624 C2F9 9A9A E1EB 13EC 05E3

To claim this, I am signing this object:

@roguesherlock
roguesherlock / Workspace Controls.ahk
Created February 12, 2018 16:38
Workspace Controls for Windows
#NoTrayIcon
; Workspace Shortcuts
;-----------------------------------------------------------------------------------------------
+Right::
{
MouseGetPos,,,win
WinGetClass, class, ahk_id %win%
If class in Progman,WorkerW
@roguesherlock
roguesherlock / Media Controls.ahk
Last active February 12, 2018 16:40
Media Controls Shortcuts for Windows
; Media Control Shortcuts
;
;-----------------------------------------------------------------------------------------------
#NoTrayIcon
F12::Send {Volume_Up}
F11::Send {Volume_Down}
F10::Send {Volume_Mute}
F9::Send {Media_Next}
F8::Send {Media_Play_Pause}
F7::Send {Media_Prev}
@roguesherlock
roguesherlock / django-postgresql-gunincorn-nginx-pyenv-ubuntu-16.04.md
Created January 8, 2018 06:06 — forked from kasappeal/django-postgresql-gunincorn-nginx-pyenv-ubuntu-16.04.md
How to deploy a Django app with PostgreSQL + Gunicorn + Nginx using pyenv on Ubuntu Server 16.04

How to deploy a Django app with PostgreSQL + Gunicorn + Nginx using pyenv on Ubuntu Server 16.04

This guide shows how to setup a production environment for a Django application using PostgreSQL as database, Gunicorn as application server and Nginx as http server using Ubuntu Server 14.04 as Operative System.

Install PosgreSQL, Nginx, Git and Circus

Install PostgreSQL and Nginx using:

sudo apt-get install -y postgresql-9.5 postgresql-contrib-9.5 postgresql-server-dev-9.5 nginx git circus make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils python-setuptools 
@roguesherlock
roguesherlock / image_dump_mac.txt
Last active October 24, 2018 15:17
Dump sdcard in macos
#insert sdcard
# locate sdcard
diskutil list
# unmount sdcard
diskutil unmount /dev/diskx
# dump sdcard and compress
dd if=/dev/diskx | gzip > /path/to/image.img.gz
@roguesherlock
roguesherlock / _.md
Created October 22, 2017 11:47 — forked from klange/_.md
It's a résumé, as a readable and compilable C source file. Since Hacker News got here, this has been updated to be most of my actual résumé. This isn't a serious document, just a concept to annoy people who talk about recruiting and the formats they accept résumés in. It's also relatively representative of my coding style.

Since this is on Hacker News and reddit...

  • No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later). My actual résumé is a good bit crazier.
  • I apologize for the use of _t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".
  • Since people kept complaining, I've fixed the assignments of string literals to non-const char *s.
  • My use of type * name, however, is entirely intentional.
  • If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at le
@roguesherlock
roguesherlock / del_old_backup_postgres.sh
Created August 29, 2017 03:19
delete old postgres backups
#!/bin/bash
LOG="path/to/logs"
BACKUP_DIR="path/to/backupdir"
START_TIME=$(date +%s)
echo "Clean Old Backups :: ScriptStart -- $(date '+%Y-%m-%d_%H-%M-%S')" >> $LOG
echo "[INFO] find $BACKUP_DIR/* -name "*.gz" -mtime +30 -type f -delete" >> $LOG
find $BACKUP_DIR/* -name "*.gz" -mtime +30 -type f -delete >> $LOG
END_TIME=$(date +%s)
ELAPSED_TIME=$(expr $END_TIME - $START_TIME)
echo "Clean Old Backups :: ScriptEnd -- $(date '+%Y-%m-%d_%H-%M-%S')" >> $LOG
@roguesherlock
roguesherlock / backup_postgres.sh
Last active September 26, 2017 09:37
Backup script for postgres in docker container
#!/bin/bash
LOG="path/to/logs"
START_TIME=$(date +%s)
echo "Backup :: ScriptStart -- $(date '+%Y-%m-%d_%H-%M-%S')" >> $LOG
USER="postgres"
HOST="db"
BACKUP_DIR="path/to/backupdir/"
SRC_DIR="path/to/src/dir"
GZIP="$(which gzip)"
NOW=$(date '+%Y-%m-%d_%H-%M-%S')
@roguesherlock
roguesherlock / OS161_set-up.md
Created July 24, 2017 04:32 — forked from gerito1/OS161_set-up.md
A simple guide to have running the os161 kernel in Arch Linux

A simple guide to have running the os161 kernel in Arch Linux

This are some notes for the course OS 161 from ops-class.org (based on the OS 161 course from Harvard).

#Geting started

You will need some tools. A nice Text Editor or a fancy IDE for C, I usually go for gedit, or sometimes vim.

Then you will need to install all the toolchain for the course plus some other tools