Skip to content

Instantly share code, notes, and snippets.

Avatar
😱
Oh well

Irakli Gozalishvili Gozala

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

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.

View dat-github-pages-shortname.md

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 Jun 10, 2022
my version of gpg on the mac
View git-gpg.md
  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 Sep 23, 2018
Hacker news requests example
View HackerNewsExample.elm
--------------------------
-- 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 Mar 26, 2022
Statically Typed Lisp
View AnIntro.md

Basic unit type:

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

Basic functions:

@Gozala
Gozala / test.cljs
Created Jan 23, 2013
Running clojurescript tests
View test.cljs
(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 Jan 19, 2013
clojurescript/test/cljs/cljs/core_test.cljs with breaking tests commented out with TODOs
View core_test.cljs
(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"])))))
@maxogden
maxogden / bundle.js
Created Nov 8, 2012
html5 color scheme picker
View bundle.js
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 Nov 6, 2012
Git pre-commit hook to add a new line at the end of a file and remove trailing whitespaces
View pre-commit.sh
#!/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 Apr 17, 2017
Code Coverage in Mozilla Code
View coverage_recipe.md