Skip to content

Instantly share code, notes, and snippets.

View NanoAi's full-sized avatar
🏠
Working from home

NanoAi NanoAi

🏠
Working from home
View GitHub Profile
@NanoAi
NanoAi / NodeJS-Installer.sh
Last active August 29, 2015 14:15
Shell script for installing NodeJS
echo "Hello, we will now install NodeJS & NPM."
read -p "Would you like to remove an old install first? (Y/n) " -n 1 -r && echo ""
if [[ $REPLY =~ ^[Yy]$ || ! $REPLY ]]
then
sudo apt-get remove nodejs
sudo apt-get remove npm
sudo apt-get autoremove
echo ""
fi
@NanoAi
NanoAi / screencap.sh
Created June 7, 2015 20:12
Script for screencapture and auto send to server, on Mac OSX Yosemite.
SITE="http://i.mirai.red";
DIR=~/Screenshots/;
[email protected];
FLDR=/home/i.mirai.red;
NM=$(LC_CTYPE=C tr -dc "a-zA-Z0-9" < /dev/urandom | head -c 5).png;
FILE=$(screencapture -i $DIR$NM && echo $DIR$(ls -Art $DIR | tail -n 1));
if [ -a $FILE ] ; then
@NanoAi
NanoAi / gist:2d3440014cba9c2d3f6c
Created August 16, 2015 06:24
Hosts File Generator for Linux and Mac
#!/bin/bash
echo "/etc/hosts | Stats" && stat -x /etc/hosts && echo -n "Number of Lines: " && wc -l /etc/hosts && echo -n "MD5: " && md5 /etc/hosts
echo -e "\n-------------------------\n"
cp ~/bakup.hosts ~/hosts.uniq
curl --silent http://someonewhocares.org/hosts/hosts | grep '^127.0.0.1' >> ~/hosts.uniq && echo "someonewhocares.org : DONE"
curl --silent http://www.malwaredomainlist.com/hostslist/hosts.txt | grep '^127.0.0.1' >> ~/hosts.uniq && echo "malwaredomainlist.org : DONE"
curl --silent https://adaway.org/hosts.txt | grep '^127.0.0.1' >> ~/hosts.uniq && echo "adaway.org : DONE"
curl --silent http://winhelp2002.mvps.org/hosts.txt | grep '^127.0.0.1' >> ~/hosts.uniq && echo "mvps.org : DONE"
curl --silent http://hosts-file.net/ad_servers.txt | grep '^127.0.0.1' >> ~/hosts.uniq && echo "hosts-file.net : DONE"
@NanoAi
NanoAi / spraymeshcontext.lua
Last active March 14, 2016 03:42
Gmod Spraymesh Context Plugin
-- Created by LuaTenshi @ https://github.com/LuaTenshi
-- Pro Tip: Requires http://steamcommunity.com/sharedfiles/filedetails/?id=394091909
local Menu = {}
local function contextgen(title, tab)
-- Created by LuaTenshi @ https://github.com/LuaTenshi
if Menu and IsValid(Menu) then Menu:Remove() end
local Menu = vgui.Create( "DMenu" )

Keybase proof

I hereby claim:

  • I am luatenshi on github.
  • I am noize (https://keybase.io/noize) on keybase.
  • I have a public key ASBIgUh31VCQlcBSrUyNWcx_NFmQpQyJznM3kPWKhDyoEwo

To claim this, I am signing this object:

@NanoAi
NanoAi / unstuck.lua
Created July 21, 2016 01:23 — forked from SunRed/unstuck.lua
A simple unstuck script in gmod
-- TODO: Nocollided props still trigger even with MASK_PLAYERSOLID!
---------------------------------------------------------------
local ply = nil
-- WeHateGarbage
local t = {start=nil,endpos=nil,mask=MASK_PLAYERSOLID,filter=nil}
local function PlayerNotStuck()
t.start = ply:GetPos()
t.endpos = t.start
@NanoAi
NanoAi / ulx_sh_luadev.lua
Created July 28, 2016 07:23
(Garry's Mod) Add ULX Support for Luadev.
local cmds = {}
if ulx and ulx.cmdsByCategory and not aowl then
aowl = {}
function aowl.cmdExsits(cmd)
local t = ulx.cmdsByCategory['Luadev Commands'] or {}
if t and #t >= 1 then
for i=1,#t do
if t[i].cmd == cmd then return true end
@NanoAi
NanoAi / sh_optispawn.lua
Created August 2, 2016 08:24
[Garry's Mod] Spawn Protection for Build and RP servers.
local ents = ents
local player = player
local hook = hook
local _G = _G
local vec = {
Vector(3395.537598,1590.232178,166.751633), -- Coordinate Mins
Vector(2890.368164,769.798523,-194.843491) -- Coordinate Maxs
}
@NanoAi
NanoAi / lolitembuild-probuilds.js
Last active November 24, 2016 07:50
JQuery, League of Legends Item Build Generator for https://probuilds.net/
var output = {};
output["blocks"] = {[0]: {},[1]: {}};
output["blocks"][0]["items"] = new Array();
output["blocks"][1]["items"] = new Array();
var date = new Date();
date = date.toLocaleDateString();
function builditemfile(datadragon){
var mydata = {};
@NanoAi
NanoAi / spoilerAlert.plugin.js
Last active July 11, 2022 16:21
spoilerAlert.plugin.js
//META{"name":"spoilerAlert"}*//
/*@cc_on
@if (@_jscript)
// _jscrupt stolen (not really) from noodlebox#0155!
// Offer to self-install for clueless users that try to run this directly.
var shell = WScript.CreateObject("WScript.Shell");
var fs = new ActiveXObject("Scripting.FileSystemObject");
var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\\BetterDiscord\\plugins");
var pathSelf = WScript.ScriptFullName;