Skip to content

Instantly share code, notes, and snippets.

@llecram
llecram / LLM.md
Created March 30, 2023 22:38 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@llecram
llecram / triangle_rotate.cpp
Created March 24, 2023 04:58 — forked from sr6033/triangle_rotate.cpp
OpenGL program using GLFW3 to rotate a triangle
#include <GLFW/glfw3.h>
#include <stdlib.h>
#include <stdio.h>
static void error_callback(int error, const char* description)
{
fputs(description, stderr);
}
static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)
{
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
@llecram
llecram / build_dependencies.sh
Created March 10, 2023 05:00 — forked from mokemokechicken/build_dependencies.sh
Build Script for Tesseract for iOS5
#! /bin/sh
# http://tinsuke.wordpress.com/2011/11/01/how-to-compile-and-use-tesseract-3-01-on-ios-sdk-5/
# cd /usr/local/src
# mkdir Tesseact
# cd Tesseact
# wget "http://www.leptonica.com/source/leptonica-1.68.tar.gz"
# wget "http://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz"
#
# mkdir dependencies
# tar xzf leptonica-1.68.tar.gz
@llecram
llecram / ogl_osx.md
Created January 5, 2023 14:05 — forked from v3n/ogl_osx.md
GLFW on OS X starting guide

OpenGL Development on OS X

While it's possible to download packages and install them manually, it's such a hassle. Fortunately for us, OS X has an unofficial package manager called http://brew.sh Let's install it. Open you Terminal and paste the following code:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Great. Homebrew will automatically install packages to /usr/local. Conveniently, that directory is already in your include and link paths.

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@llecram
llecram / Results.md
Created September 20, 2022 20:47 — forked from nkt/Results.md
ReactPHP vs Node.js

wrk -t4 -c400 -d10s http://127.0.0.1:1337/

PHP

Running 10s test @ http://127.0.0.1:1337/
  4 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
 Latency 7.02ms 6.94ms 82.86ms 85.27%
@llecram
llecram / gist:af4db492c757f0a377aa6043fd94bab2
Created September 13, 2022 18:25 — forked from markjaquith/gist:6225805
WordPress multi-tenant directory structure sharing core files for opcode awesomeness, fast deployments, and low disk usage. With inspiration from @weskoop. "=>" indicates a symlink.
sites
|__ ms.dev
| |__ content
| |__ index.php
| |__ wp => ../../wordpress/stable
| |__ wp-config.php
|__ one.dev
| |__ content
| |__ index.php
| |__ wp => ../../wordpress/stable
@llecram
llecram / b.cpp
Created May 10, 2022 06:56 — forked from certik/b.cpp
Polished version of a C++11 binary search tree taken from http://stackoverflow.com/a/24591763/479532
#include <iostream>
#include <memory>
template<class T>
class BinarySearchTree{
struct TreeNode;
typedef std::unique_ptr<TreeNode> spTreeNode;
struct TreeNode{
T data;
spTreeNode left;
@llecram
llecram / Sandbox_InApp_Recipt.json
Created February 21, 2022 19:14 — forked from greenSyntax/Sandbox_InApp_Recipt.json
InApp Sandbox Receipt
{
"status": 0,
"environment": "Sandbox",
"receipt": {
"receipt_type": "ProductionSandbox",
"adam_id": 0,
"app_item_id": 0,
"bundle_id": "co.in.greensyntax.Restman",
"application_version": "1",
"download_id": 0,
@llecram
llecram / verify_hmac.php
Created November 27, 2020 06:15 — forked from turret-io/verify_hmac.php
Verify HMAC in PHP
<?php
define("SHARED_SECRET", "sup3rs3cr3t!!");
if(!function_exists('hash_equals')) {
function hash_equals($str1, $str2) {
// Run constant-time comparison for PHP < 5.6 which doesn't support hmac_equals
$str1_len = strlen($str1);
$str2_len = strlen($str2);