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 boot | |
(set-env! | |
:dependencies '[[org.clojure/clojure "1.10.0"] | |
[org.clojure/data.json "0.2.6"] | |
[district0x/graphql-query "1.0.6"] | |
[http-kit "2.3.0"] | |
[clj-gatling "0.13.0"] | |
[clj-time "0.15.0"]]) | |
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
# make the bios boot from a live usb stick | |
# mount the filesystem and change to it | |
sudo mkdir /mnt/root | |
sudo mount /dev/sd2 /mnt/root | |
sudo mount -t proc none /mnt/root/proc | |
sudo mount -o bind /dev /mnt/root/dev | |
sudo chroot /mnt/root /bin/bash | |
# fix the issues |
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
# find e.g. Windows 8 (on /dev/sda2) | |
fgrep menuentry /boot/grub/grub.cfg | |
# MAKE SURE NOT TO BOOT FROM THE OS YOU ARE ALREADY IN!! | |
sudo vim /etc/default/grub | |
# modify it, like | |
# GRUB_DEFAULT=0 | |
GRUB_DEFAULT="Windows 8 (on /dev/sda2)" | |
# then create an image for your disk |
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
(ns sketches.sketch-lines | |
(:require [quil.core :as q] | |
[quil.middleware :as m] | |
[lib.key-press-handlers :refer [save-image]] | |
[sketches.palette :refer [find-palette rand-palette]])) | |
(def body (.-body js/document)) |
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
(ns example.core | |
(:require [cljs.js :as cjs] | |
[cljs.analyzer :as ana :include-macros true] | |
[cljs.reader :as r] | |
[cljs.pprint :as pprint])) | |
(enable-console-print!) | |
(let [src "(ns t.math) | |
(defn increase [n] (inc n))" |
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
/* | |
Lookup geometry: /usr/bin/xwininfo | |
Backup: https://gist.github.com/torgeir/401084929e678640b0cd36b3c92b5f03 | |
*/ | |
(and (is (application_name) "Firefox") | |
(begin | |
(set_workspace 1) | |
(geometry "1387x1138+0-32"))) | |
(and (is (application_name) "emacs-snapshot") |
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 r2 = require("r2"); | |
const npm = require("npm"); | |
const { spawn } = require("child_process"); | |
const [_, __, accessToken, repo] = process.argv; | |
const shellCmdStdoutToObject = (cmd, args) => | |
new Promise(function(resolve, reject) { | |
const child = spawn(cmd, args); | |
let result = ""; |
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 path = require('path'); | |
const myth = require('myth'); | |
const globby = require('globby'); | |
const loaderUtils = require('loader-utils'); | |
const resolve = function () { | |
const p = [__dirname].concat(Array.from(arguments)); | |
return path.resolve.apply(path, p); | |
}; |
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"; | |
import ReactDOM from "react-dom"; | |
import Rx from "rxjs/Rx"; | |
// hyperappish | |
const identity = v => v; | |
const doto = (o, fn) => (fn(o), o); | |
const getIn = (obj, [k, ...ks]) => (ks.length == 0) ? obj[k] : getIn(obj[k], ks); |
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 wait = s => new Promise((resolve) => setTimeout(resolve, s * 1000)) | |
const state = {}; | |
dataField(state, "ip", "http://ip.jsontest.com/"); | |
console.log(state.ip); | |
wait(2) | |
.then(() => state.ip) | |
.then(console.log); |