Skip to content

Instantly share code, notes, and snippets.

View boogie666's full-sized avatar

Bogdan Bugarschi boogie666

  • Timisoara
View GitHub Profile
@boogie666
boogie666 / markov-text.clj
Last active July 11, 2017 16:13
a awesomely cool sentence generator
(ns markov-text.core
(:require [clojure.string :as str]))
(defn spliter [str]
(mapv str/lower-case (str/split str #"\s")))
(defn markov-chain [n-gram-size words]
(loop [m-chain {}
words words]
@boogie666
boogie666 / core.clj
Last active July 13, 2020 05:33
Core logic example
(ns logical-db.core
(:require [clojure.core.logic :as l]
[clojure.core.logic.protocols :refer [walk]]
[clojure.core.logic.pldb :as db]))
; [org.clojure/clojure "1.8.0"]
; [org.clojure/core.logic "0.8.10"]
(def db { :city->zip {"City1" [1 2 3 4] "City2" [5 6]}
@boogie666
boogie666 / .jshintrc
Created September 13, 2014 13:28
JSHint Config file
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope
@boogie666
boogie666 / reset.css
Last active January 2, 2016 06:28
Reset CSS
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
@boogie666
boogie666 / happyNewYear.js
Last active January 1, 2016 20:49
Happy New Year
var finalCountDown = (function(){
var end = new Date('01/01/2014 00:00:00'),
timer,
second = 1000,
minute = second * 60,
hour = minute * 60,
day = hour * 24;
return function(textSetter){
timer = setInterval(function() {