Skip to content

Instantly share code, notes, and snippets.

@vishless
vishless / skyrim-keybind-issue-fix
Last active March 10, 2019 06:02
Follow these steps to fix the Skyrim keybind bugs
** STEPS TO FIX THE KEYBIND BUG IN SKYRIM **
1. Subscribe to the Steam Workshop page of Skyrim Key Helper. (https://steamcommunity.com/sharedfiles/filedetails/?id=8639)
2. Open up skyrim for the mod files to download
3. Set the controls to the following
ESDF for movement
r for equip
t for ready
y for wait
@vishless
vishless / mysql_stored_procedure_timelogs.sql
Last active March 20, 2018 10:22
Useful for bench-marking the time taken to run specific queries in a MySQL stored procedure
SET @started=NOW();
# Put Query Here!!
SET @completed=NOW();
SET @timetaken=TIMEDIFF(@completed,@started);
# save it to a table using the query below
# doesn't work, its just a sample query
INSERT INTO timelogs (
`timestamp`,
@vishless
vishless / global_context_emacs.reg
Created January 1, 2018 02:49
Add Emacs to context menu
REGEDIT4
[HKEY_CLASSES_ROOT\*\shell]
[HKEY_CLASSES_ROOT\*\shell\openwemacs]
@="&Edit with 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:\\emacs\\bin\\emacs.exe,0"
# The above uses the icon of the Emacs exe for the context
To see what's running on port 3000
lsof -i tcp:3000
@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)
@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 / 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 / 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 / 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 / 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