Skip to content

Instantly share code, notes, and snippets.

@ivanhoe011
ivanhoe011 / variousCountryListFormats.js
Created March 2, 2023 11:39 — forked from incredimike/variousCountryListFormats.js
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
// or Laravel: https://github.com/squirephp/squire
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
//
@ivanhoe011
ivanhoe011 / clean_pdf.sh
Created January 29, 2022 00:55 — forked from sneakers-the-rat/clean_pdf.sh
Strip PDF Metadata
# --------------------------------------------------------------------
# Recursively find pdfs from the directory given as the first argument,
# otherwise search the current directory.
# Use exiftool and qpdf (both must be installed and locatable on $PATH)
# to strip all top-level metadata from PDFs.
#
# Note - This only removes file-level metadata, not any metadata
# in embedded images, etc.
#
# Code is provided as-is, I take no responsibility for its use,
@ivanhoe011
ivanhoe011 / key.md
Created February 28, 2019 11:35
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

@ivanhoe011
ivanhoe011 / .block
Created August 20, 2018 05:02 — forked from mbostock/.block
The Gist to Clone All Gists
license: gpl-3.0
@ivanhoe011
ivanhoe011 / po2json.js
Created August 7, 2018 07:48 — forked from zaach/po2json.js
PO parser from http://jsgettext.berlios.de/lib/Gettext.js adapted for Node.js and modified to be more like po2json.pl
#!/usr/bin/env node
/*
PO parser from http://jsgettext.berlios.de/lib/Gettext.js
adapted for Node.js and modified to be more like po2json.pl
- Zach Carter <[email protected]>
*/
/*
Pure Javascript implementation of Uniforum message translation.
#!/bin/bash
URL="https://www.youtube.com/watch?v=MnIYp-PaoXg&list=PLRtkK6TD_2LLWHeAAYnalSVCXZV0T39vu&index=1"
~/bin/youtube-dl -x -k -o "%(playlist_index)02d. %(title)s - %(id)s.%(ext)s" --audio-format "mp3" --audio-quality 0 "$URL"
for F in *.mp3; do
ARTIST="Daniel Delux"
NUM=$(echo "${F}" | sed -e 's/^\([0-9]\+\)\..*$/\1/')
TITLE=$(echo "${F}" | sed -e 's/^[0-9]\+\.\s*//' -e 's/^\(.\+\) - \(.\+\) - .*$/\2/')
Users and their passwords attempts
[0]
4
1
1 -
2 !
2 !@
1 &
1 0
3 0000
@ivanhoe011
ivanhoe011 / SparkRoleMiddleware.md
Created November 14, 2016 03:58 — forked from dillinghamio/SparkRoleMiddleware.md
Team Role Middleware For Laravel Spark

Team Role Middleware For Laravel Spark

Makes it simple to use Spark's role feature on routes

Route::group(['middleware'=>'role:owner'], function(){
    // owners only
});

Route::group(['middleware'=>'role:member'], function(){
@ivanhoe011
ivanhoe011 / sql-mixin.md
Created November 4, 2016 08:03 — forked from rgbkrk/sql-mixin.md
Turning lodash into declarative SQL

Lodash has a sweet feature called a mixin that lets you alias function names. Below here I alias names that we're used to using in SQL to (roughly) equivalent functions in lodash.

_.mixin({
  select: _.map,
  from: _.chain,
  where: _.filter,
  groupBy: _.sortByOrder,
})
@ivanhoe011
ivanhoe011 / happy_git_on_osx.md
Created August 19, 2016 00:01 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "[email protected]"