Skip to content

Instantly share code, notes, and snippets.

View esiqveland's full-sized avatar

Eivind Siqveland Larsen esiqveland

View GitHub Profile

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@thealexcons
thealexcons / jwt_golang_example.go
Last active April 16, 2023 03:04
JSON Web Tokens in Go
package main
import (
"io/ioutil"
"log"
"strings"
"net/http"
"encoding/json"
"fmt"
"time"
@yang-wei
yang-wei / keyValuePairs.elm
Last active May 1, 2019 05:36
Json.Decode example
import Graphics.Element exposing (Element, show)
import Task exposing (Task, andThen)
import Json.Decode exposing (Decoder, int, string, object3, (:=), at, keyValuePairs)
import Http
type alias Languages =
List (String, Int)
mailbox =
@precurse
precurse / gist:6dc1990cd000551c8f11
Last active May 17, 2019 12:07
Asus Zenbook UX305C Skylake - Arch Linux 4.3.3-2-ARCH Kernel
$ dmesg |grep ASUSTeK
[ 8.627599] Hardware name: ASUSTeK COMPUTER INC. UX305CA/UX305CA, BIOS UX305CA.201 09/11/2015
$ uname -a
Linux laptop 4.3.3-2-ARCH #1 SMP PREEMPT Wed Dec 23 20:09:18 CET 2015 x86_64 GNU/Linux
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:0a2a Intel Corp.
Bus 001 Device 003: ID 064e:9700 Suyin Corp. Asus Integrated Webcam
@igouss
igouss / ObservableQuery.java
Created September 22, 2015 22:12
RxJava and Hibernate Scrollable query Raw
package com.naxsoft.database;
import org.hibernate.Query;
import org.hibernate.ScrollMode;
import org.hibernate.ScrollableResults;
import org.hibernate.StatelessSession;
import rx.Observable;
/**
* Copyright NAXSoft 2015
@ricardo-rossi
ricardo-rossi / maven-333.sh
Last active September 17, 2020 09:42 — forked from ervinb/maven-333.sh
Install Maven 3.3.3 on Ubuntu 14.04
#!/bin/sh
sudo apt-get purge -y maven
if ! [ -e apache-maven-3.3.3-bin.tar.gz ]; then (curl -OL http://mirror.olnevhost.net/pub/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz); fi
sudo tar -zxf apache-maven-3.3.3-bin.tar.gz -C /usr/local/
sudo ln -s /usr/local/apache-maven-3.3.3/bin/mvn /usr/bin/mvn
echo "Maven is on version `mvn -v`"
@mbrevoort
mbrevoort / gist:dcdbbb4e2d5b2f62f407
Created June 1, 2015 06:08
CircleCI Circle.yml for building Godeps backed Go service and building and pushing to private docker registry
machine:
services:
- redis
- docker
environment:
PROJECT_NAME: <your-project>
checkout:
post:
@mikelehen
mikelehen / generate-pushid.js
Created February 11, 2015 17:34
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/
@mrserverless
mrserverless / Configuration.java
Last active March 14, 2019 12:08
Dropwizard serving Static Assets on Root URL "/" and APIs on "/api/"
public class ApplicationConfiguration extends Configuration implements AssetsBundleConfiguration {
@Valid
@NotNull
@JsonProperty
private AssetsConfiguration assets;
@Override
public AssetsConfiguration getAssets() {
return assets;
}
@mrserverless
mrserverless / JdbiIntegrationTest.java
Last active August 29, 2015 14:08 — forked from thody/JdbiIntegrationTest.java
Dropwizard JDBI Integration Test slightly more simplified and upgraded to Dropwizard version 0.7.1
public abstract class JdbiIntegrationTest {
protected DBI dbi;
private Handle handle;
private Liquibase liquibase;
protected abstract DataSourceFactory getDataSourceFactory();