Skip to content

Instantly share code, notes, and snippets.

View bhu1st's full-sized avatar
🎯
Focusing

bhu1st bhu1st

🎯
Focusing
View GitHub Profile
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@dannguyen
dannguyen / faa-333-pdf-gathering.md
Last active June 19, 2021 13:18
Using wget + grep to explore inconveniently organized federal data (FAA Section 333 Exemptions)

if !database: wget + grep

The Federal Aviation Administration is posting PDFs of the Section 333 exemptions that it grants, i.e. the exemptions for operators who want to fly drones commercially before the FAA finishes its rulemaking. A journalist wanted to look for exemptions granted to operators in a given U.S. state. But the FAA doesn't appear to have an easy-to-read data file to use and doesn't otherwise list exemptions by location of operator.

However, since their exemptions page is just one giant HTML table for listing the PDFs, we can just use wget to fetch all the PDFs, run pdftotext on each file, and then [grep](https://medium.com/@rualthanzauva/grep-was-a-private-command-of-m

@brasofilo
brasofilo / github.php
Last active November 5, 2023 23:40
GitHub Plug-in for WordPress (Take 2) * Basic information about your repositories and its Forks and Watchers. * Based on http://www.developerdrive.com/2013/06/github-plug-in-for-wordpress/
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: GitHub Plug-in for WordPress (Take 2)
* Description: Basic information about, your repositories, and its Forks and Watchers.
* Plugin URI: https://gist.github.com/brasofilo/6898766
* Version: 2013.10.09
* Author: Rodolfo Buaiz
* Author URI: http://brasofilo.com
* License: GPL
* Text Domain: plugin_unique_name
@sohjsolwin
sohjsolwin / InstallCinnamonCrouton
Created July 6, 2013 13:49
Steps to install and setup a cinnamon flavored crouton on a Chromebook Pixel
# The next command will install a [raring] based ubuntu
# chroot, named [cinnamon] into the default directory
# with the targets [core], [cli-extra], [touch], and [keyboard]
sudo crouton -n cinnamon -r raring -t core,cli-extra,touch,keyboard
# Supply your new username and password like normal, and
# once that finishes, enter the chroot with:
sudo enter-chroot -n cinnamon
@malarkey
malarkey / Contract Killer 3.md
Last active May 17, 2024 15:28
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@hubgit
hubgit / google-drive-upload-pdf.php
Created April 30, 2012 17:13
Upload a PDF file to Google Drive
<?php
require 'google-api/apiClient.php';
require 'google-api/contrib/apiOauth2Service.php';
require 'google-api/contrib/apiDriveService.php';
$pdfFile = 'test.pdf';
// API Console: https://code.google.com/apis/console/
// Create an API project ("web applications") and put the client id and client secret in config.ini.
@marcoscoelho
marcoscoelho / gist:1101567
Created July 23, 2011 15:48
Generating image thumbnail with PyroCMS - Files Module
image original dimensions (???x???)
files/large/1
files/thumb/1/auto/auto
files/thumb/1/auto/auto/fill
files/thumb/1/auto/auto/fit
max default dimensions (100x100) with aspect ratio
files/thumb/1
@chrisjacob
chrisjacob / README.md
Created February 18, 2011 03:44
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

(function () {
try {
if (!google.doodle) google.doodle = {};
var a = 200,
g = -200,
j = -200,
k, l, m, n = 0,
o = 0,
p = 0,
q = 35,
#!/bin/sh
#
# init.d script with LSB support.
#
# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org>
#
# This is free software; you may redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2,
# or (at your option) any later version.