Skip to content

Instantly share code, notes, and snippets.

View thisandagain's full-sized avatar

Andrew Sliwinski thisandagain

View GitHub Profile
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active July 21, 2024 08:16
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@cadecairos
cadecairos / api.json
Created April 28, 2015 20:13
JSON Schema for api.webmaker.org
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://api.webmaker.org/",
"title": "Project Schema",
"type": "object",
"properties": {
"project": {
"id": "https://api.webmaker.org/project",
"type": "object",
"properties": {
@hahahana
hahahana / README.md
Last active April 3, 2017 19:13
Use JSCS with .jsx files and React

How to use JSCS with .jsx files (and React)

Install JSCS and Esprima-FB:

  npm install jscs esprima-fb --save-dev 

In your .jscsrc use esprima-fb as the custom esprima option and include .jsx as a file extension. You will also need to choose a preset so there are rules to check against. If you'd rather, you can also use the --auto-configure option.

@ndarville
ndarville / webm.md
Last active September 30, 2023 18:56
4chan’s guide to converting GIF to WebM - https://boards.4chan.org/g/res/41212767

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.
@cloud1105
cloud1105 / IntenUtils
Created October 26, 2013 06:46
take picture OR pick image from gallery
public class IntentUtils {
private static final String TAG = IntentUtils.class.getName();
public static Intent getPhotoCropIntent(File f, int width) {
Intent intent = new Intent("com.android.camera.action.CROP");
intent.setDataAndType(Uri.fromFile(f), "image/*");
intent.putExtra("crop", "true");
intent.putExtra("aspectX", 1);
@goshacmd
goshacmd / fix_sys_rb.sh
Created June 12, 2013 07:41
OS X [REDACTED] Ruby 2.0 headers fix.
sys_rb_usr=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
sdk_rb_usr=`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
sudo cp -r $sdk_rb_usr/include $sys_rb_usr/include
@jhs
jhs / example.js
Created December 10, 2012 03:16
My Node.js modules these days
// Short module explanation // Something to gather my thoughts
// // I think this looks cool.
//
module.exports = the_exported_function // Modules are a function. Always.
//
module.exports.extra = extra // Additional API entry points if
module.exports.other = other // desired.
//
var util = require('util') // Other packages from npm or core
var assert = require('assert') // No comma-first due to lots of
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE