Skip to content

Instantly share code, notes, and snippets.

View barthr's full-sized avatar
🎯
Focusing

Bart barthr

🎯
Focusing
View GitHub Profile
@LiquidityC
LiquidityC / Makefile
Last active December 1, 2023 03:24
Generic drop in Makefile
VERSION = \"1.0.0\"
PREFIX ?= out
INCDIR = inc
SRCDIR = src
LANG = c
OBJDIR = .obj
MODULE = binary_name
CC = gcc
@c-bata
c-bata / certificate.go
Created September 28, 2017 10:05
Verify the JSON Web Token obtained from Firebase Authentication. But now, Go SDK is released by firebase organization.
package jwt
import (
"crypto/rsa"
"errors"
"encoding/json"
"io/ioutil"
"net/http"
"crypto/x509"
"encoding/pem"
@dirko
dirko / keras_bidirectional_tagger.py
Created August 11, 2016 05:32
Keras bidirectional LSTM NER tagger
# Keras==1.0.6
from keras.models import Sequential
import numpy as np
from keras.layers.recurrent import LSTM
from keras.layers.core import TimeDistributedDense, Activation
from keras.preprocessing.sequence import pad_sequences
from keras.layers.embeddings import Embedding
from sklearn.cross_validation import train_test_split
from keras.layers import Merge
from keras.backend import tf
package semaphore
// Semaphore channel
type Semaphore chan struct{}
// Acquire resource
func (s Semaphore) Acquire() {
s <- struct{}{}
}
@barthr
barthr / ticketswap.js
Last active August 27, 2019 10:54
Javascript Ticketswap crawler
var current = window.location.href;
var party_url = "";//Typ hier je Feest url
var base_url = "https://www.ticketswap.nl";
$( document ).ready(function() {
if (current.indexOf("event") > -1) {
refreshPage();
}
else if (current.indexOf("listing") > -1){
orderCard();
@drorata
drorata / gist:146ce50807d16fd4a6aa
Last active February 27, 2024 10:15
Minimal Working example of Elasticsearch scrolling using Python client
# Initialize the scroll
page = es.search(
index = 'yourIndex',
doc_type = 'yourType',
scroll = '2m',
search_type = 'scan',
size = 1000,
body = {
# Your query's body
})
@yifanz
yifanz / Makefile
Last active August 13, 2018 08:17
Generic Makefile
http://stackoverflow.com/questions/7004702/how-can-i-create-a-makefile-for-c-projects-with-src-obj-and-bin-subdirectories
# ------------------------------------------------
# Generic Makefile
#
# Author: yanick.rochon@gmail.com
# Date : 2011-08-10
#
# Changelog :
# 2010-11-05 - first version
@awidegreen
awidegreen / vim_cheatsheet.md
Last active April 12, 2024 02:26
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname