Skip to content

Instantly share code, notes, and snippets.

View roguesherlock's full-sized avatar
:shipit:

Akash roguesherlock

:shipit:
View GitHub Profile
@roguesherlock
roguesherlock / CodingStyle.txt
Created August 12, 2016 08:41
Linux Kernel Coding Style
Linux kernel coding style
This is a short document describing the preferred coding style for the
linux kernel. Coding style is very personal, and I won't _force_ my
views on anybody, but this is what goes for anything that I have to be
able to maintain, and I'd prefer it for most other things too. Please
at least consider the points made here.
First off, I'd suggest printing out a copy of the GNU coding standards,
@roguesherlock
roguesherlock / muttrc
Created September 24, 2016 07:06
muttrc file for gmail. passwords encrypted with keybase
source "keybase decrypt -i ~/.mutt/passwords.keybase |"
##
## Main
##
set editor = "emacs"
set from = "0xelectron <0xproton@gmail.com>"
set edit_headers = yes
set imap_user = "0xproton@gmail.com"
@roguesherlock
roguesherlock / adapter-passthrough
Created March 18, 2017 15:28 — forked from Lewiscowles1986/adapter-passthrough
Allows passthrough for bridges, wireless access-point's and range extenders
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
ADAPTER="eth0"
# Allow overriding from eth0 by passing in a single argument
@roguesherlock
roguesherlock / rPi3-ap-setup.sh
Created March 18, 2017 15:28 — forked from Lewiscowles1986/rPi3-ap-setup.sh
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses September 2016 rpi jessie image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@roguesherlock
roguesherlock / gpio_input_listener.py
Last active April 1, 2017 07:30
GPIO-Input-Listener: A simple python script that listens for gpio input events (more specifically button clicks) and calls appropriate methods. It has a very basic bouncing mechanism.It has logging capabilities and restarts itself on any exception.Basically, It's trying to imitate a daemon.I hope it might be useful to someone.
#!/usr/bin/env python
#########################################################################
# GPIO-Input-Listener: A simple python script that listens for #
# gpio input events (more specifically button clicks) and calls #
# appropriate methods. It has a very basic bouncing mechanism. #
# It has logging capabilities and restarts itself on any exception. #
# Basically, It's trying to imitate a daemon. #
# I hope it might be useful to someone. #
# Copyright (c) 2017 0xelectron #
#########################################################################
@roguesherlock
roguesherlock / emailme.py
Created April 21, 2017 11:08 — forked from alexalemi/emailme.py
Python Gmail Email notification sender, with SMS and docopt.
#! /usr/bin/env python
""" Email Me.
Usage:
emailme <message>
emailme [-s] <message>
emailme [-s] <subject> <message>
emailme <toaddr> <subject> <message>
emailme <toaddr> <fromaddr> <subject> <message>
emailme -h | --help
@roguesherlock
roguesherlock / Useful Commands
Last active October 31, 2018 06:37
Bunch of Commands that I find it useful
# Check what is causing the slow loading times for fish shell
fish --profile prompt.prof -ic 'fish_prompt; exit'; sort -nk 2 prompt.prof
# check for broken links
find . -type l -xtype l
# fix fedora 25 nvdia problems
# GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/root rhgb quiet rd.driver.blacklist=nouveau"
# That's from my /etc/default/grub.
@roguesherlock
roguesherlock / roomservice.xml
Created July 14, 2017 13:51
Vertex OS local manifest
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="https://bitbucket.org/" name="bb" />
<remote name="vertex-devices"
fetch="https://github.com/VertexOS-Devices/"
revision="n" />
<project name="android_extras_vertexota" path="extras/vertexota" remote="vertex" />
<project name="android_device_oneplus_oneplus3" path="device/oneplus/oneplus3" remote="vertex-devices" />
<project name="EAS-project/android_device_voxpopuli" path="device/voxpopuli" remote="github" revision="msm8996" />
@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

@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')