Skip to content

Instantly share code, notes, and snippets.

View boycaught's full-sized avatar
🏠
Working from home!

.LAG boycaught

🏠
Working from home!
View GitHub Profile
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active July 21, 2024 01:20
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
component {
public function init() output="false" {
return this;
}
public function parse(data) output="false" {
local.links = [];
//loop over each line in the file
@paulmillr
paulmillr / dart.md
Last active July 2, 2024 18:11
Leaked internal google dart email

---------- Forwarded message ----------

From: Mark S. Miller <erights@google.com>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: javascript-standard@google.com
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@nvk
nvk / readme
Created April 19, 2012 18:20
Using Git with Dropbox
### Instructions source http://tumblr.intranation.com/post/766290743/using-dropbox-git-repository ####
-- make empty repo on dropbox:
cd ~/Dropbox/RipeApps/Git
mkdir -p newname.git
cd !$
git --bare init
-- push your junk into it
cd ~/Projects/myrepo
@Dammmien
Dammmien / wget.sh
Last active June 12, 2024 13:29
wget cheat sheet
# POST a JSON file and redirect output to stdout
wget -q -O - --header="Content-Type:application/json" --post-file=foo.json http://127.0.0.1
# Download a complete website
wget -m -r -linf -k -p -q -E -e robots=off http://127.0.0.1
# But it may be sufficient
wget -mpk http://127.0.0.1
# Download all images of a website
@gagarine
gagarine / install-clamav-osx.md
Last active June 10, 2024 15:36
Howto Install clamav on OSX with brew

Howto Install clamav on OSX with brew

Note: on legacy intel system the path may be /usr/local/etc/clamav instead of /opt/homebrew/etc/clamav/

$ brew install clamav
$ cd /opt/homebrew/etc/clamav/
$ cp freshclam.conf.sample freshclam.conf
@jaketrent
jaketrent / parseDbCopyToMarkdown.js
Created February 19, 2017 14:41
Convert database copy data to markdown
const fs = require('fs')
// input format:
// 25 The Innovator’s Dilemma The simultaneous need and danger to reinvent oneself and one's business is the dilemma. Do we disrupt ourselves or do we double-down on core competencies? A dilemma indeed! http://i.imgur.com/exW4j8F.jpg 2014-08-20 2014-11-28 19:05:28.153598 2014-11-28 19:05:28.153598 Craig Christensen http://www.amazon.com/gp/product/B00E257S86/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B00E257S86&linkCode=as2&tag=jaktre-20&linkId=5CDH2BHJK7TZT52R
const separateColumns = line => line.split('\t')
const nameColumns = line => ({
id: line[0],
title: line[1],
description: line[2],
coverUrl: line[3],
@brimwats1
brimwats1 / vtt2text.py
Created February 2, 2021 11:10 — forked from glasslion/vtt2text.py
This script convert youtube subtitle file(vtt) to plain text.
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.