Skip to content

Instantly share code, notes, and snippets.

Lance Pollard lancejpollard

Block or report user

Report or block lancejpollard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lancejpollard / malloc.c
Last active Dec 10, 2019 — forked from mshr-h/malloc.c
simple malloc implementation
View malloc.c
/* Include the sbrk function */
#include <unistd.h>
int has_initialized = 0;
void *managed_memory_start;
void *last_valid_address;
void malloc_init() { /* grab the last valid address from the OS*/
last_valid_address = sbrk(0);
/* we don't have any memory to manage yet, so
lancejpollard /
Last active Dec 9, 2019
Folder Structure for Modern Frontend JavaScript Apps

I have thought about folder structures for many years. What I've found is that there is no standard way to represent all things, you have to decide on something and either stick with it, or adopt an evolutionary development mindset (EDM). An EDM is one where you're free to test out new ideas and your code (or in this case, folder structure) is free to evolve into a better and better form as you uncover the mysteries of what is best in your case. You let your team create whatever folder structures they like, without enforcing it, and see what sticks. This will lead to variations in style, but you can then go through and change it again to be even better. Stuff like that.

What I've decided on for the frontend is something like this.


That's it! Now, everything in code in reality is an action if you boil it down. That is what assembly is if you take a look, just a bunch of actions. Every action can be composed into more and more complex action

lancejpollard /
Last active Dec 9, 2019
System Call List for Windows, Mac, and Linux
lancejpollard /
Created Dec 8, 2019 — forked from CMCDragonkai/
Linux: Understanding the Memory Layout of Linux Executables

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore
lancejpollard /
Created Nov 24, 2019
Curses Reference by N. Matloff

Introduction to the Unix Curses Library

Norman Matloff

Department of Computer Science

University of California at Davis

c 1997-2011, N. Matloff April 8, 2011


1 History 2 1.1 Purpose of the Curses Library 1.2 Evolution of the Role of Curses

View kangyur.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
Catalog Number,ACIP,,English,Subject
KL00001-001(eTB),'DUL BA GZHI 1,འདུལ་བ་གཞི་།,"Foundation of Vowed Morality, Part 1 (Vinaya Vastu 1)",༡ འདུལ་བ།/ཀ།
KL00006-001(eTB),'DUL BA PHRAN TSEGS KYI GZHI 1,འདུལ་བ་ཕྲན་ཚེགས་ཀྱི་གཞི་།,"Foundation of Assorted Topics of Vowed Morality, Part 1 (Vinaya Kshudraka Vastu 1)",༡ འདུལ་བ།/ཐ།
KL00006-002(eTB),'DUL BA PHRAN TSEGS KYI GZHI 2,འདུལ་བ་ཕྲན་ཚེགས་ཀྱི་གཞི་།,"Foundation of Assorted Topics of Vowed Morality, Part 2 (Vinaya Kshudraka Vastu 2)",༡ འདུལ་བ།/ད།
KL00007-A(eTB),'DUL BA GZHUNG BLA MA,འདུལ་བ་གཞུང་བླ་མ།,The Higher Classic on Vowed Morality (Vinaya Uttara Grantha A),༡ འདུལ་བ།/ན།
KL00007-111(eTB),'DUL BA GZHUNG DAM PA 1,འདུལ་བ་གཞུང་དམ་པ་།,"The Perfect Classic on Vowed Morality, Part 1 (Vinaya Uttara Grantha B, 1)",༡ འདུལ་བ།/ན།
KL00007-112(eTB),'DUL BA GZHUNG DAM PA 2,འདུལ་བ་གཞུང་དམ་པ་།,"The Perfect Classic on Vowed Morality, Part 2 (Vinaya Uttara Grantha B, 2)",༡ འདུལ་བ།/པ།
KL00001-002(eTB),'DUL BA GZHI 2,འདུལ་བ་གཞི་།,"Foundation of Vowed Morality, Part 2
lancejpollard /
Last active Aug 10, 2019
How React Hooks are Implemented
    element: React$Element<any>,
    container: DOMContainer,
    callback: ?Function,
  ) {
      'Target container is not a DOM element.',
lancejpollard / main.c
Created Mar 22, 2019 — forked from josephg/main.c
kqueue network & file example
View main.c
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/event.h>
#include <netdb.h>
#include <assert.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
lancejpollard / encryption.js
Created Dec 14, 2017 — forked from vlucas/encryption.js
Stronger Encryption and Decryption in Node.js
View encryption.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bytes (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', new Buffer(ENCRYPTION_KEY), iv);
lancejpollard /
Created Dec 1, 2017 — forked from soarez/
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

You can’t perform that action at this time.