Skip to content

Instantly share code, notes, and snippets.

@vishless
vishless / cmd_timestamp
Last active November 27, 2017 09:02
Command to generate a formatted timestamp in cmd
Timestamp
echo %DATE:~-4%%DATE:~4,2%%DATE:~7,2%%time:~-11,2%%time:~-8,2%%time:~-5,2%
//Knife-AWP Quick Switch
alias +knife slot3
alias -knife slot1
bind a +knife
Counter Strike Global Offensive - Weapon Binds (community guide)
http://steamcommunity.com/sharedfiles/filedetails/?id=203603867
@vishless
vishless / skyrim-key-mapper
Created April 15, 2017 08:16
AHK script to remap Skyrim keyboard controls
; AHK script to remap keys in ESV Skyrim.
; This script solves the problem with hardcoded inventory keys.
; `Favorite` and `Drop all items` actions have `F` and `R` keys hardcoded.
; e::w => e key is pressed AHK sends the w key.
#SingleInstance,Force
#IfWinActive ahk_class Skyrim
;movement keys
e::w
s::a
@vishless
vishless / autoexec.cfg
Last active January 1, 2018 02:57
Config file which executes on CSGO startup
// NETWORK SETTINGS
rate 312500
cl_updaterate 128
cl_cmdrate 128
cl_interp 0
cl_interp_ratio 2
cl_predict 1
cl_predictweapons 1
cl_lagcompensation 1
@vishless
vishless / genesis.json
Created October 23, 2017 09:25
Ethereum genesis file for starting a testnet
{
"config": {
"chainId": 15,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"nonce": "0x0000000000000042",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
@vishless
vishless / contract.sol
Created October 23, 2017 10:48
Solidity HelloWorld Contract
contract mortal {
/* Define variable owner of the type address */
address owner;
/* This function is executed at initialization and sets the owner of the contract */
function mortal() { owner = msg.sender; }
/* Function to recover the funds on the contract */
function kill() { if (msg.sender == owner) selfdestruct(owner); }
}
@vishless
vishless / global_context_emacs.reg
Created November 27, 2017 05:44
Add emacs to right click menu
REGEDIT4
[HKEY_CLASSES_ROOT\*\shell]
[HKEY_CLASSES_ROOT\*\shell\openwemacs]
@="&GNU Emacs"
# The above value appears in the global context menu,
# i.e., when you right click on a file.
# (The '&' makes the next character a shortcut.)
"Icon"="C:\\Program Files\\Emacs\\bin\\emacs.exe,0"
# The above uses the icon of the Emacs exe for the context
@vishless
vishless / cmd_init_script.reg
Last active November 27, 2017 09:00
Add registry entry to run a script when cmd starts
https://stackoverflow.com/questions/17404165/how-to-run-a-command-on-command-prompt-startup-in-windows
Open cmd and run the command below
reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun ^
/t REG_EXPAND_SZ /d "%"USERPROFILE"%\init.cmd" /f
@vishless
vishless / .emacs
Last active December 13, 2017 17:07
Emacs configuration
(require 'package)
(add-to-list
'package-archives
;; '("melpa" . "http://stable.melpa.org/packages/") ; many packages won't show if using stable
'("melpa" . "http://melpa.milkbox.net/packages/")
t)
(package-initialize)
;; recent files
(require 'recentf)
To see what's running on port 3000
lsof -i tcp:3000