Skip to content

Instantly share code, notes, and snippets.

View fartbagxp's full-sized avatar

fartbagxp fartbagxp

  • Some type of engineering
  • Virginia
View GitHub Profile
@fartbagxp
fartbagxp / port-relay.py
Created May 31, 2016 03:52
Port relay from zorinaq blog
#!/usr/bin/python
#
# This is the relay script mentioned in http://blog.zorinaq.com/?e=81
#
# Listens on the address and port specified by --local-ip and --local-port, and
# relay all connections to the endpoint specified by --remote-hosts and
# --remote-port. Multiple remote hosts can be specified: one will be selected
# randomly for each connection.
#
# Optionally, if --mode 1:<secret> is specified, insert the secret key as the
@fartbagxp
fartbagxp / amazon-redhat-nodejs-install.sh
Created August 15, 2016 00:55
AWS - Amazon Linux Nodejs Installation
#!/bin/bash
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
yum -y install nodejs
# For any native addons that requires building
yum install gcc-c++ make
@fartbagxp
fartbagxp / Docker - Elasticsearch - Kibana - Windows
Last active September 2, 2016 04:33
Installation of Elasticsearch with Kibana on Windows using Docker
Running elasticsearch on windows - docker
docker run -d -v "esdata":/usr/share/elasticsearch/data --name elasticsearch -p 9200:9200 -p 9300:9300 elasticsearch
Running Kibana and linking it to elasticsearch (Windows)
docker run --link elasticsearch:elasticsearch -p 5601:5601 -d kibana
Removing Docker containers
docker rm -f <container-name>
Root phone.
Enable "Developer Options". If not, Go to "Settings" -> "About phone", scroll down to "Build number" and tap it quickly 7 times. This should cause a new menu item in the "Settings" menu titled, "Developer options"
Open "Settings" -> "Developer options" and under "Debugging", enable "USB debugging".
Connect phone to computer via USB.
Open a command prompt on the computer and run adb devices to see if your phone is recognized.
If so, run adb shell
Next type: su -c 'setprop sys.usb.config diag,adb'
You should have DIAG mode access to run QPST/QXDM/etc. until the next power cycle.
@fartbagxp
fartbagxp / update.sh
Last active October 19, 2017 15:17
Git pull local directories
#!/bin/bash
for i in */.git; do ( echo $i; cd $i/..; git pull; ); done
@fartbagxp
fartbagxp / go
Created November 11, 2017 05:05
Golang generate anonymize strings
func init() {
rand.Seed(time.Now().UnixNano())
}
var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
func RandStringRunes(n int) string {
b := make([]rune, n)
for i := range b {
b[i] = letterRunes[rand.Intn(len(letterRunes))]
@fartbagxp
fartbagxp / visual-studio.md
Created January 27, 2018 04:45
Visual Studio hotkeys / shortcuts

General

Ctrl + P - Quick Selection

Ctrl K, Ctrl C - comment Ctrl K, Ctrl U - uncomment

Shift + Up/Down - highlight

File switch

Ctrl + Tab - last file

@fartbagxp
fartbagxp / setup.sh
Created February 20, 2018 20:56
Thinkpad-Carbon-X1-Setup
#!bin/bash
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install curl nmap git
// Disable the synatic pad (12 is where the pinpoint is, leave that on)
xinput --disable 11
// Install NVM for node
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
@fartbagxp
fartbagxp / user-settings.json
Created February 21, 2018 23:42
Visual Studio user settings
{
"window.zoomLevel": 1,
"files.autoSave": "off",
"editor.tabSize": 2,
"workbench.colorTheme": "Material Theme",
"workbench.iconTheme": "material-icon-theme",
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnSave": true,
"eslint.autoFixOnSave": true,
"eslint.alwaysShowStatus": true
@fartbagxp
fartbagxp / server-setup.md
Created March 10, 2018 12:31
RTMP server setup

Overview

Read this where it talks about setting up your own private RTMP server.

Docker image can be found here.

Alternatively: there's this.