Skip to content

Instantly share code, notes, and snippets.

View TheNicholasNick's full-sized avatar

Nicholas Nick TheNicholasNick

View GitHub Profile
@TheNicholasNick
TheNicholasNick / tips.md
Last active May 6, 2018 18:10
limit xmr-stak via cgroups linux, ubuntu 16.04

setup cgroups v1 to limit process on linux have top running and see the miner cpu usage

/etc/cgrules.conf

user:process_name cpu group
example:

trtlminer:xmr-stak cpu app/xmrstak
@TheNicholasNick
TheNicholasNick / DigitalOcean.Graphs.js
Last active April 3, 2018 04:34
User script for showing Digital Ocean graphs minus the noise
// https://cloud.digitalocean.com/droplets/*/graphs*
setTimeout(function() {
$('.nav-bar-v2:first').css("height", "0");
$('.nav_controls_v2:first').css("display", "none");
$('.networking-row:first').css("display", "none");
$('.small-2.columns').css("display", "none");
$('.row').css("width","835px");
$('.small-10.columns').addClass("small-12").removeClass("small-10");
$('.Footer').css("display", "none");
$('#aurora-container').css("padding-bottom","0");
@TheNicholasNick
TheNicholasNick / 1_info.md
Last active November 15, 2017 20:20
Find app keeping Windows from screensaver/monitor standby
  1. First create the script below.
  2. Then create a shortcut to it cmd /c "the script"
  3. give the shortcut a fancy icon
    • %systemroot%\system32\imageres.dll
    • %systemroot%\system32\shell32.dll
    • %systemroot%\system32\ddores.dll
  4. before exiting the shortcut properties, go to Advanced on the Shortcut tab and tick "run as administrator"
  5. finally pin that shortcut to start -
  • if making changes to the shortcut, need to unpin and repin again
@TheNicholasNick
TheNicholasNick / info.txt
Last active June 24, 2017 01:43
vDSL Stats
Diagnostics >> DSL Status
General Tone Information | Refresh |
ATU-R Information
Type: VDSL2
Hardware: Annex A
Firmware: 05-07-06-0D-01-07
Power Mngt Mode: DSL_G997_PMS_L0
Line State: SHOWTIME
Running Mode: 8B
@TheNicholasNick
TheNicholasNick / npm-proxy-cache.txt
Last active August 21, 2017 07:35
NPM Proxy Cache - save pulling from the internet all the time...
# For Ubuntu 16.04 vm guest where I code, windows host
# prefer not to have system installed node/go/erlang/elixir/etc
# thanks http://willcodefor.beer/setup-your-own-npm-cache-server/ for the idea!
sudo useradd -m -c "NPM-Proxy-Cache" npmpc
sudo su npmpc
cd
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.1.0
echo '. $HOME/.asdf/asdf.sh' >> ~/.bashrc
@TheNicholasNick
TheNicholasNick / 01_Building.from.Source
Last active January 30, 2017 15:52
CodeAnywhere - Blank Ubuntu 14.04 Initial Config Steps
sudo apt-get update
sudo apt-get install --reinstall language-pack-en-base
sudo dpkg-reconfigure locales
cat <<EOT >> ~/.bashrc
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_MESSAGES=POSIX
EOT
@TheNicholasNick
TheNicholasNick / 001 - 407 Auth Req - 1st request
Created September 25, 2015 04:22
Fiddler Squid Negotiate Headers
GET http://fast.fonts.net/t/1.css HTTP/1.1
Host: fast.fonts.net
Proxy-Connection: keep-alive
Accept: text/css,*/*;q=0.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36
DNT: 1
Referer: http://edition.cnn.com/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-GB,en;q=0.8,en-AU;q=0.6,ceb;q=0.4
# p = Principle (rrp, amount financed, vehicle cost)
# i = interest rate (pass in as rate/100/12, so 8.56% = 8.56/100/12 = 0.00713, i = 0.00713
# t = term
# r = residual
# pw = 1 or 0, payment when, 1 = advance, 0 = arrears
def self.monthly_payment(p,i,t,r,pw)
#
# Monthly rate is computed as follows:
#
# p*i*(1+i)**t - i*r
action@silver-bullet-27:~/workspace$ ember new app
version: 0.1.7
installing
create .bowerrc
create .editorconfig
create .ember-cli
create .jshintrc
create .travis.yml
create Brocfile.js
create README.md
@TheNicholasNick
TheNicholasNick / 01 Install Arch Linux Guest on VirtualBox.md
Last active November 26, 2017 14:24
Simple to the point no fluff install Arch Linux Guest on VirtualBox