Skip to content

Instantly share code, notes, and snippets.

@rusty-key
rusty-key / vscode-merlin.md
Last active Jan 7, 2020
vscode merlin steps
View vscode-merlin.md

here's current "from-scratch" setup:

  1. git clone git@github.com:arrowresearch/vscode-merlin.git
  2. Remove vendor source from bsconfig
  3. npm install && npm run package (yarn fails for some reason, didn't investigate), install extension
  4. Upgrade esy to 0.6: npm install -g @esy-nightly/esy
  5. Add esy.json to your project:
{
  "devDependencies": {
    "@opam/ocaml-lsp-server": "*",
View gist:67e78834649a1c4e8986a8fb91a29ff3
Eg. URL translating en page to es
http://translate.google.com/translate?hl=en&sl=en&tl=es&u=http://about.com
Define the web interface language to be English by adding
hl=en to the end of the URL and after the change the URL will look
like this:
http://www.google.com/search?hl=en
When you use more than one setting code in the URL, you need to use
@rusty-key
rusty-key / jsx2-wrapper.js
Last active May 20, 2019
jsx2 wrapper for jsx3 bindings
View jsx2-wrapper.js
// requires node 12.*
const fs = require('fs')
const path = require('path')
const refmt = require('reason');
const dir = path.resolve(process.argv[2])
if (!fs.existsSync(dir)) {
console.error(`${dir} doesn't exist`);
return
@rusty-key
rusty-key / parser.js
Created Sep 10, 2018
PropTypes → BS
View parser.js
const fs = require('fs')
const path = require('path')
const definedTypes = {
'PropTypes.string': 'string',
'PropTypes.bool': 'bool',
}
const files = fs.readdirSync('src')
.filter(file => file[0] === file[0].toUpperCase() && file[0] !== '_')
View .merlin
B _build/src
S src
PKG cmdliner lwt
FLG -w +a-4-40..42-44-45-48
View index.re
[@bs.val] [@bs.scope ("module")]
external isHotEnabled : bool = "hot";
[@bs.val] [@bs.scope ("module", "hot")] external hotAccept : unit => unit = "accept";
ReactDOMRe.renderToElementWithId(<App />, "root");
if (isHotEnabled) {
hotAccept();
}
View counties.json
[
{"label": "Afghanistan", "value": "af"},
{"label": "Åland Islands", "value": "ax"},
{"label": "Albania", "value": "al"},
{"label": "Algeria", "value": "dz"},
{"label": "American Samoa", "value": "as"},
{"label": "AndorrA", "value": "ad"},
{"label": "Angola", "value": "ao"},
{"label": "Anguilla", "value": "ai"},
{"label": "Antarctica", "value": "aq"},
View gist:134d23e027a1b6f9e129e8543a12f218
{
"order": [
"custom-properties",
"dollar-variables",
{
"type": "at-rule",
"name": "mixin"
},
"declarations",
{
View .gitconfig
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p
p = push
po = push origin
View .eslintrc.json
{
"extends": "airbnb/legacy",
"rules": {
"vars-on-top": 0,
"func-names": 0,
"no-new": 0,
"space-before-function-paren": [2, "never"],
"no-param-reassign": 0
},
"env": {
You can’t perform that action at this time.