Skip to content

Instantly share code, notes, and snippets.

View Gozala's full-sized avatar
😱
Oh well

Irakli Gozalishvili Gozala

😱
Oh well
View GitHub Profile
@mafintosh
mafintosh / bitcoin-for-laypeople.md
Last active April 1, 2020 12:46
Blog post about how Bitcoin works in a way non computer people can understand it

Bitcoin for laypeople

(Chinese version available here, courtesy of @jiangplus

(This is an English translation of my Danish blog post, Bitcoin for voksne)

Bitcoin is a digital currency that has no central authority. It's a currency where you do not have to rely on anyone to know it's worth it. As a concept, it's similar to gold. Gold has a value in itself, as opposed to, say a $100 note that only has value if the U.S. government says it has value. Similarly, the idea of ​​Bitcoins is that they have value by themselves.

Let's try to understand how Bitcoin works.

Using Dat with a github.io domain

https://i.imgur.com/akOrIOq.png

My personl site is hosted at hashbase.io (link) so that you can access it via dat and https. My canonical dat url is dat://pfrazee.hashbase.io.

Before I used hashbase I used Github Pages, and today it dawned on me that I can have dat://pfrazee.github.io work too. It's pretty simple if you know the dat dns spec.

All I had to do was add /.well-known/dat to my site (click to view). I put the raw dat URL of my site in that file, along with a TTL.

@bcomnes
bcomnes / git-gpg.md
Last active February 13, 2024 07:33
my version of gpg on the mac
  1. brew install gnupg, pinentry-mac (this includes gpg-agent and pinentry)

  2. Generate a key: $ gpg --gen-key

  3. Take the defaults. Whatevs

  4. Tell gpg-agent to use pinentry-mac:

    $ vim ~/.gnupg/gpg-agent.conf 
    
@TheSeamau5
TheSeamau5 / HackerNewsExample.elm
Last active September 23, 2018 00:24
Hacker news requests example
--------------------------
-- CORE LIBRARY IMPORTS --
--------------------------
import Task exposing (Task, ThreadID, andThen, sequence, succeed, spawn)
import Json.Decode exposing (Decoder, list, int, string, (:=), map, object2)
import Signal exposing (Signal, Mailbox, mailbox, send)
import List
---------------------------------
-- THIRD PARTY LIBRARY IMPORTS --
@chrisdone
chrisdone / AnIntro.md
Last active March 24, 2024 21:13
Statically Typed Lisp

Basic unit type:

λ> replTy "()"
() :: ()

Basic functions:

@Gozala
Gozala / test.cljs
Created January 23, 2013 08:55
Running clojurescript tests
(load-file "../test/cljs/cljs/quick.cljs")
(run-tests)
(load-file "../test/cljs/cljs/core_test.cljs")
(test-stuff)
@kanaka
kanaka / core_test.cljs
Created January 19, 2013 18:18
clojurescript/test/cljs/cljs/core_test.cljs with breaking tests commented out with TODOs
(ns cljs.core-test)
(defn test-stuff []
(println "Starting tests")
;; js primitives
(let [keys #(vec (js-keys %))]
(assert (= [] (keys (js-obj)) (keys (apply js-obj []))))
(assert (= ["x"] (keys (js-obj "x" "y")) (keys (apply js-obj ["x" "y"])))))
@max-mapper
max-mapper / bundle.js
Created November 8, 2012 18:29
html5 color scheme picker
var require = function (file, cwd) {
var resolved = require.resolve(file, cwd || '/');
var mod = require.modules[resolved];
if (!mod) throw new Error(
'Failed to resolve module ' + file + ', tried ' + resolved
);
var cached = require.cache[resolved];
var res = cached? cached.exports : mod();
return res;
};
@johnjohndoe
johnjohndoe / pre-commit.sh
Created November 6, 2012 11:48
Git pre-commit hook to add a new line at the end of a file and remove trailing whitespaces
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# Usage:
# Remove the .sh file extension when you put the script in your hooks folder!
#
@gregglind
gregglind / coverage_recipe.md
Last active April 17, 2017 15:36
Code Coverage in Mozilla Code