Skip to content

Instantly share code, notes, and snippets.

@phsym
phsym / hashtable.c
Last active February 21, 2024 12:57
An hashtable implementation in C
/*
* Author : Pierre-Henri Symoneaux
*/
#include <stdlib.h>
#include <string.h>
//Hashtable element structure
typedef struct hash_elem_t {
struct hash_elem_t* next; // Next element in case of a collision
@JeanMeche
JeanMeche / gist:50102a47937e9896e4f4
Created April 19, 2015 16:47
Levenshtein — swift
/**
* Levenshtein edit distance calculator
* Usage: levenstein <string> <string>
*
* Inspired by https://gist.github.com/bgreenlee/52d93a1d8fa1b8c1f38b
* Improved with http://stackoverflow.com/questions/26990394/slow-swift-arrays-and-strings-performance
*/
class Tools {
@esamattis
esamattis / WebViewAutoHeight.js
Last active February 11, 2022 16:01
React native: Is it possible to have the height of a html content in a webview? http://stackoverflow.com/q/32952270
/*
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2016 Esa-Matti Suuronen <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
//
// InAppManager.swift
//
// Created by Ellina Kuznetcova on 12/10/2016.
// Copyright © 2016 Flatstack. All rights reserved.
//
import Foundation
import StoreKit
@thanasik
thanasik / tx_send_example.go
Created March 27, 2017 20:43
Sending an Ethereum transaction in Go
package main
import (
"fmt"
"math/big"
"context"
"io/ioutil"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/keystore"
@ganapativs
ganapativs / iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup.md
Last active November 15, 2024 18:18
iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup
@davidhariri
davidhariri / jwt-apple-signin.py
Created October 12, 2019 18:14
Code required to verify Sign in with app-made Apple JWT tokens server-side in Python
import jwt
from jwt.algorithms import RSAAlgorithm
import requests
from time import time
import json
import os
APPLE_PUBLIC_KEY_URL = "https://appleid.apple.com/auth/keys"
APPLE_PUBLIC_KEY = None
@hermanho
hermanho / donate_crack.md
Created March 27, 2022 00:46 — forked from stu43005/donate_crack.md
[Cracked] Checker Plus for Gmail

破解 Checker Plus for Gmail 的 donate 功能限制

步驟

  1. 找到該 Extension 的 ID (通常從 Chrome WebStore 安裝的皆為oeopbcgkkoapgobdbedcemjljbihmemj)
  2. 訪問以下網址 chrome-extension://[ExtensionID]/donate.html?action=coinbaseSuccess
  • 帶入預設ID則為 chrome-extension://oeopbcgkkoapgobdbedcemjljbihmemj/contribute.html?action=coinbaseSuccess
  1. 破解完成~