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
:- module(sudoku, [solve/1, print_puzzle/1]). | |
:- use_module(library(apply)). | |
:- use_module(library(apply_macros)). | |
:- use_module(library(clpfd)). | |
:- use_module(library(list_util), [split_at/4, iterate/3]). | |
:- use_module(library(lists), [append/2]). | |
:- use_module(library(yall)). | |
blocks(_, [], []) :- !. |
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
class ShoppingCart { | |
constructor(name) { | |
this.name = name; | |
this.items = []; | |
} | |
addItem(item) { | |
this.items.unshift(item); | |
} |
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 ruby | |
# Copyright (C) 2014 Tobias V. Langhoff <[email protected]>. All Rights Reserved. | |
# This file is licensed under GPLv2+. Please see COPYING for more information. | |
# | |
# 1Password Importer | |
# | |
# Reads files exported from 1Password and imports them into pass. Supports comma | |
# and tab delimited text files, as well as logins (but not other items) stored | |
# in the 1Password Interchange File (1PIF) format. |
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 python3 | |
""" | |
Emulate Gnome's Unicode input method. | |
Requires `pyxhook` and `xdotool` to be installed | |
`pip install pyxhook` | |
`sudo apt-get install xdotool` | |
""" |
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
#!/bin/bash | |
set -euo pipefail | |
set +e | |
if ! git diff-files --quiet --ignore-submodules ; then | |
echo "Uncommited changes; stash or commit before deploying" | |
exit 1 | |
fi | |
if ! git diff-index --cached --quiet HEAD --ignore-submodules ; then |
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 spacebaluch.perlin) | |
; Based on eevee's implementation | |
; https://gist.github.com/eevee/26f547457522755cb1fb8739d0ea89a1 | |
; and blog post | |
; https://eev.ee/blog/2016/05/29/perlin-noise/ | |
(def sqrt | |
#?(:cljs js/Math.sqrt | |
:clj #(Math/sqrt %))) |
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
[ | |
{ | |
"backcolor": "#ffffff", | |
"name": "Dvorak LCD", | |
"author": "Bart Nagel", | |
"background": { | |
"name": "Maple orange", | |
"style": "background-image: url('/bg/wood/maple-orange.jpg');" | |
}, | |
"switchMount": "alps", |
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
// | |
// ViewController.swift | |
// AnimDemo | |
// | |
// Created by James Cash on 17-02-16. | |
// Copyright © 2016 Occasionally Cogent. All rights reserved. | |
// | |
import UIKit |
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
/***************************************************** | |
* SLADE Configuration File | |
* Don't edit this unless you know what you're doing | |
*****************************************************/ | |
cvars | |
{ | |
archive_load_data 0 | |
elist_colname_width 80 | |
elist_colsize_width 64 |
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 blog.precompile | |
(:require [me.raynes.fs :as fs] | |
[cljs.closure :as cljsc] | |
[clojure.java.io :as io]) | |
(:import [javax.script ScriptEngineManager ScriptException])) | |
(defn eval-js | |
[js] | |
(let [engine (.getEngineByName (ScriptEngineManager. ) "nashorn")] | |
(.eval engine js))) |
NewerOlder