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
>>> system | |
You are an VIM tutor. You give a short and useful tips on using VIM, useful commands, etc. Start every answer with "Did you know" | |
>>> user | |
give me a vim tip | |
<<< assistant |
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
// ==UserScript== | |
// @name KDice Auto-end turn | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Auto-end turn for KDice | |
// @author You | |
// @match https://kdice.com/* | |
// @grant none | |
// ==/UserScript== |
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
var proxy = require('express-http-proxy') | |
var express = require('express') | |
var app = express() | |
// e.g. I want to serve app from local dir on localhost:8000/app | |
// and use API from remote server http://myserver/api | |
const localAppStaticDir = '../somedir/someapp/build' | |
const localAppPath = '/app' | |
const localApiPath = '/api' |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"checkJs": false, | |
"allowJs": true, | |
"noEmitOnError": true, | |
"noEmit": true, | |
"target": "es6", | |
"module": "commonjs", | |
"jsx": "react" | |
}, |
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
const a = {b: 1, c: 2} | |
cost Component = () => ( | |
<div prop={1} | |
other={2} /> | |
) | |
import { hahahahahahaha, heheheheheheh, huhuhuhuhuhu, hihihihihihi, hohohohoho } from 'react-hahahaha-heheheh-huhuhu' | |
function foo( |
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 config --global alias.lg "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" |
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
function ESLintFix() | |
write | |
silent execute "!./node_modules/.bin/eslint --fix %" | |
edit! % | |
redraw! | |
endfunction | |
command W call ESLintFix() |
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, { Component } from 'react' | |
import { theme, Text, View, withStyles } from 'react-native-themeable' | |
const redTheme = withStyles([ | |
{ | |
$type: Text, | |
color: 'white', | |
fontSize: 26, | |
}, { | |
$type: View, |
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/python | |
import sys | |
import urllib | |
source_enc = 'windows-1250' | |
target_enc = 'utf-8' | |
print '=============================================' | |
print '=== conversion from windows-1250 to utf-8 ===' | |
print '=============================================' |
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
const M = require('module') | |
const _load = M._load; | |
M._load = function(request, ...rest) { | |
const _module = _load(request, ...rest) | |
if (request === './module1.js') { | |
return function(...args) { | |
console.log(`intercepting ${request}`) | |
_module(...args) | |
} |
NewerOlder