This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" vim-plug setup | |
call plug#begin() | |
Plug 'altercation/vim-colors-solarized' | |
Plug 'tpope/vim-surround' | |
Plug 'scrooloose/nerdcommenter' | |
Plug 'dkprice/vim-easygrep' | |
Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'preservim/nerdtree' | |
Plug 'pangloss/vim-javascript' | |
Plug 'plasticboy/vim-markdown' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @param {NS} ns **/ | |
export async function main(ns) { | |
const server = ns.args[0] ?? ns.getHostname(); | |
while(1){ | |
await ns.hack(server); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
/** | |
* Helper component for injecting raw html into the page. | |
*/ | |
const rawFactory = type => | |
class RawComponent extends React.Component { | |
render() { | |
const { children: strings, ...props } = this.props; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git branch -u origin/$(git rev-parse --abbrev-ref HEAD) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Put this in your "setupEnvScriptFile" for Jest. | |
// usage: `jest.genMockFn().mockReturnValue(promisify('whateva'))` | |
promisify = function (returnValue, delay) { | |
delay = !!delay; | |
let delayCount = 0; | |
let recursiveMockPromise = new function () { | |
let self = this; | |
self.returnValue = returnValue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Time.new().strftime("%Y%m%d%H%M%S") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git tag -d 12345 | |
git push origin :refs/tags/12345 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
nc -l localhost 12345 | |
curl -H "Content-Type: application/json" -X POST -d '{"lol": "data"}' http://localhost:12345 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let csrfToken = 'lololololol'; | |
let axiosDefaults = require('axios/lib/defaults'); | |
axiosDefaults.headers.common['X-CSRF-Token'] = csrfToken; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/libexec/java_home -v 1.8.0_25 --exec javac -version |
NewerOlder