Skip to content

Instantly share code, notes, and snippets.

View interjc's full-sized avatar
😂
Learning

Justin Chen interjc

😂
Learning
View GitHub Profile
@VictorTaelin
VictorTaelin / gpt4_abbreviations.md
Last active March 26, 2024 22:49
Notes on the GPT-4 abbreviations tweet

Notes on this tweet.

  • The screenshots were taken on different sessions.

  • The entire sessions are included on the screenshots.

  • I lost the original prompts, so I had to reconstruct them, and still managed to reproduce.

  • The "compressed" version is actually longer! Emojis and abbreviations use more tokens than common words.

@akoepcke
akoepcke / gitmoji-cheatsheet.md
Created February 23, 2020 16:16 — forked from guillermocalvo/gitmoji-cheatsheet.md
Gitmoji Cheatsheet

Gitmoji Cheatsheet

Repository

  • 🎉 Initial commit
  • ⏪ Reverting changes
  • 🔀 Merging branches
  • 🙈 Adding or updating a .gitignore file
@jeffijoe
jeffijoe / app.js
Last active September 1, 2023 07:34
Streaming uploads through Koa.
import Koa from 'koa'
import parse from './busboy'
import AWS from 'aws-sdk'
const app = new Koa()
const s3 = new AWS.S3({
params: { Bucket: 'myBucket' }
})
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@bitzip
bitzip / .eshintrc
Created September 5, 2015 15:43
个人偏好的eslint配置,带中文注释
# 建议:官方文档对每个规则有简单易懂的例子说明,有时间的同学可以查阅一遍。
# 官方文档 http://eslint.org/docs/rules/
extends: 'eslint:recommended'
# 规则按照首字母在字母表升序排序
rules:
# 单行代码块大括号后需要一个空格
block-spacing: 2
@alyssaq
alyssaq / gulpfile.js
Last active February 13, 2024 07:55
browserify, babel, gulp, glob, vinyl-source-stream, uglify
/*
npm install gulp gulp-load-plugins gulp-uglify
npm install browserify babelify glob vinyl-source-stream vinyl-buffer
More examples: https://github.com/gulpjs/gulp/tree/master/docs/recipes
*/
var gulp = require('gulp')
var $ = require('gulp-load-plugins')()
var browserify = require('browserify')
@indieisaconcept
indieisaconcept / gist:936dbf33cfc844d87968
Last active February 2, 2023 19:58
browserify + watchify + viny-transform + multiple bundles
// this setup assumes you are using gulp-config for file.src & file.dest
// but can be adapted to vanilla easily.
'use strict';
var transform = require('vinyl-transform'),
browserify = require('browserify'),
watchify = require('watchify'),
// consider using gulp-load-plugins
@typehorror
typehorror / crawler.md
Last active February 19, 2024 03:06
Simple Website Crawler (in python)

Simple Website Crawler

The following gist is an extract of the article Building a simple crawler. It allows crawling from a URL and for a given number of bounce.

Basic Usage

from crawler import Crawler
crawler = Crawler()
crawler.crawl('http://techcrunch.com/')

displays the urls

@yanknudtskov
yanknudtskov / allow-unfiltered-admin-uploads.php
Created April 21, 2014 18:10
Allowing Unfiltered WordPress Uploads for Administrators With ALLOW_UNFILTERED_UPLOADS
define( 'ALLOW_UNFILTERED_UPLOADS', true );