This file contains hidden or 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
FROM lnl7/nix:2.2 | |
RUN nix-env -iA \ | |
nixpkgs.curl \ | |
nixpkgs.jq \ | |
nixpkgs.zsh | |
COPY ./expr.nix . | |
RUN nix-build expr.nix | |
WORKDIR result |
This file contains hidden or 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
{ pkgs ? import <nixpkgs> {} | |
, zdotdir ? import (builtins.fetchurl { | |
url = "https://gist.githubusercontent.com/damianbaar/57aff242d06c75444dbd36bf5400060e/raw/83d074d45c81a18402146cadc595a20b91bb1985/zdotdir.nix"; | |
}) { inherit pkgs; } | |
}: | |
pkgs.stdenv.mkDerivation { | |
name = "withZshEnv"; | |
shellHook= zdotdir { | |
zshenv = builtins.path { path = ./zdotdir/zshenv; }; | |
zshrc = builtins.path { path = ./zdotdir/zshrc; }; |
This file contains hidden or 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
// |
This file contains hidden or 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 CDP = require('chrome-remote-interface'); | |
const file = require('fs') | |
async function screenshot(client, location) { | |
const {Page} = client | |
const screenshot = await Page.captureScreenshot({format: 'png'}); | |
const buffer = new Buffer(screenshot.data, 'base64'); | |
file.writeFile(`${location}.png`, buffer, 'base64', function(err) { | |
if (err) console.error(err) |
This file contains hidden or 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
nnoremap <leader>ti: call GetImport('')<CR> | |
function! GetImport(word) | |
let result = json_decode(system('importjs word '.expand('<cword>').' '.expand('%'))) | |
let content = result.fileContent | |
let cursorPos = getpos(".") | |
let originalLineCount = line("$") | |
let @a = content |
This file contains hidden or 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
# Your keymap | |
# | |
# Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors | |
# to apply styles to elements, Atom keymaps use selectors to associate | |
# keystrokes with events in specific contexts. | |
# | |
# | |
# You can create a new keybinding in this file by typing "key" and then hitting | |
# tab. | |
# |
This file contains hidden or 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 flyd = require('flyd') | |
var a = flyd.stream() | |
var _buffer = [] | |
var buffer = flyd.combine(function(s, self) { | |
_buffer.push(s()) | |
if(_buffer.length == 2) { | |
self(_buffer) | |
_buffer = [] |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://npmcdn.com/@reactivex/[email protected]/dist/global/Rx.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="test1" style="width:200px;height:100px;background:#DDEEFF" >20</div> | |
<div id="test2" style="width:200px;height:100px;background:#DDDDFF;" >10</div> |