I hereby claim:
- I am roine on github.
- I am roine (https://keybase.io/roine) on keybase.
- I have a public key ASDvAb8MA0QlE3KRNLrTECoLQHkKG0_g6V6zalgXio_UvAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
See https://performancejs.com/post/hde6d32/The-Best-Frontend-JavaScript-Interview-Questions-(Written-by-a-Frontend-Engineer) and https://en.wikipedia.org/wiki/Sorting_algorithm
https://ellie-app.com/wmXvyWVYqza1/0 |
- Websocket | |
- Flexbox |
module Confirm exposing (confirm) | |
import Native.Confirm | |
import Task exposing (Task) | |
confirm : String -> Task () () | |
confirm str = | |
Native.Confirm.doConfirm str |
#!/bin/bash | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" | |
# this script will display the current version, automatically | |
# suggest a "minor" version update, and ask for input to use | |
# the suggestion, or a newly entered value. |
module Main exposing (..) | |
import Html exposing (..) | |
-- MODEL | |
type alias Model = | |
{ key : Int } |
(function () { | |
'use strict'; | |
// cssbeautify | |
(function(){"use strict";function a(a,b){function s(a){return" "===a||"\n"===a||" "===a||"\r"===a||"\f"===a}function t(a){return"'"===a||'"'===a}function u(a){return h>="a"&&"z">=h||h>="A"&&"Z">=h||h>="0"&&"9">=h||"-_*.:#".indexOf(a)>=0}function v(){var a;for(a=m;a>0;a-=1)g+=c.indent}function w(){g=r(g),p?g+=" {":(g+="\n",v(),g+="{"),"\n"!==i&&(g+="\n"),m+=1}function x(){var a;m-=1,g=r(g),q&&(a=g.charAt(g.length-1),";"!==a&&"{"!==a&&(g+=";")),g+="\n",v(),g+="}",f.push(g),g=""}var c,f,h,i,j,k,l,m,n,o,r,d=0,e=a.length,g="",p=!0,q=!1;for(c=arguments.length>1?b:{},c.indent===void 0&&(c.indent=" "),"string"==typeof c.openbrace&&(p="end-of-line"===c.openbrace),"boolean"==typeof c.autosemicolon&&(q=c.autosemicolon),r=String.prototype.trimRight?function(a){return a.trimRight()}:function(a){return a.replace(/\s+$/,"")},l={Start:0,AtRule:1,Block:2,Selector:3,Ruleset:4,Property:5,Separator:6,Expression:7,URL:8},m=0,k=l.Start,o=!1,f=[],a=a.replace(/\r\n/g,"\n");e>d;)if |
This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.
Here are the required steps to create a command:
Create a new Gist with a command.js
and command.json
file, or simply fork this one.
Write your JavaScript in command.js
. This will be injected into and executed on the page the user is currently on when they run it.
Add some metadata to the command.json
file:
var numbers = ['a', 'b', 'c']; | |
for(let i of numbers){ | |
console.log(i); // a b c | |
} | |
var users = [{ | |
firstname: 'jon', | |
lastname: 'dem' | |
}, |