Skip to content

Instantly share code, notes, and snippets.

@jank84
jank84 / scripts.js
Last active December 6, 2017 10:15
idle clicker scripts
btn = document.createElement("BUTTON");
btn.appendChild(document.createTextNode("Auto clip"));
btn.onclick = function(){
count = 10000; clickclipInter = setInterval(()=>{document.getElementById("btnMakePaperclip").click();count--; if(count<0){clearInterval(clickclipInter)}}, 20);
countWire = 10000; clickWireInter = setInterval(()=>{document.getElementById("btnBuyWire").click();countWire --; if(countWire <0){clearInterval(clickWireInter)}}, 20);
countProc = 10000; clickProcInter = setInterval(()=>{document.getElementById("btnAddProc").click();countProc --; if(countProc <0){clearInterval(clickProcInter )}}, 20);
countMem = 10000; clickMemInter = setInterval(()=>{document.getElementById("btnAddMem").click();countMem --; if(countMem <0){clearInterval(clickMemInter )}}, 20);
};
document.body.appendChild(btn);
@jank84
jank84 / vuejs-ts-check-tricks.md
Last active April 26, 2024 04:39
vuejs with ts-check

ts check

ignore next ts check error

const app = new Vue({
  router,
  store,
  // @ts-ignore
  ...App
@jank84
jank84 / one_liner.md
Created June 27, 2017 13:09
python stuff
python -c "import shutil, os;shutil.rmtree('bbb') if os.path.isdir('bbb') else None;shutil.copytree('aaa', 'bbb')"
@jank84
jank84 / hotkeys.md
Last active August 13, 2017 16:54
editor

vscode

Key action
ctrl-shift-ß close fold
ctrl-^ split file to right view
ctrl-shift-^ jump parenthesis
alt-shift- Up/down duplicate line above/below
shift-alt- <-/-> expand (select) region
alt- <-/-> cursor history
shift-del del line

batch for tabbed multi start

start cmd /K "C:\Program Files\MongoDB\Server\3.0\bin\mongod.exe" --dbpath C:\mongodb-pa
start cmd "/K cd C:\webserver\htdocs\pa-frontend-2 && npm start"
start cmd "/K cd C:\Workspace-local\pa-api && npm run debug"

batch for split window multi start

conemu -cmdlist ^
-cur_console cmd.exe cmd /K "C:\Program Files\MongoDB\Server\3.0\bin\mongod.exe" --dbpath C:\mongodb-pa ^|^|^| ^

react

short import paths

"resolve": {
     alias: {
       '@': resolve('src')
       //To end the "../../"-mandness:
       // import ConfigActions from './../../../../../actions/ConfigActions' -> import ConfigActions from '@/actions/ConfigActions'
     },
 },
@jank84
jank84 / git.md
Last active February 23, 2017 11:03
git

git config

[alias]
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"