Skip to content

Instantly share code, notes, and snippets.

View makzan's full-sized avatar
🎯
Focusing

Thomas Seng Hin Mak makzan

🎯
Focusing
View GitHub Profile
@veekaybee
veekaybee / chatgpt.md
Last active April 12, 2024 20:16
Everything I understand about chatgpt

ChatGPT Resources

Context

ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?

I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.

Model Architecture

<!DOCTYPE html>
<html>
<head>
<title>Accordions</title>
<style type="text/css">
body {
margin: 0 auto;
max-width: 40em;
width: 88%;
@danielgtaylor
danielgtaylor / gist:0b60c2ed1f069f118562
Last active April 2, 2024 20:18
Moving to ES6 from CoffeeScript

Moving to ES6 from CoffeeScript

I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.

In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.

While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.

Punctuation

Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio

@chrismdp
chrismdp / s3.sh
Last active March 5, 2024 12:57
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@bendc
bendc / functional-utils.js
Last active September 15, 2023 12:12
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)
@lox
lox / Makefile
Last active March 28, 2018 12:55
Replaced Grunt/Gulp with a Makefile
SASSC = sass --style compact
COMPSDIR = resources/assets/components
SASSDIR = resources/assets/css
JSDIR = resources/assets/js
DISTDIR = web/dist
CSSDIR = $(DISTDIR)/css
SASSINC = $(SASSDIR) \
$(COMPSDIR)/asimov/src/scss \
$(COMPSDIR)/asimov-contests/src/scss \
$(COMPSDIR)/asimovicons/src/scss
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@chrisyip
chrisyip / vagrant-lamp.sh
Created May 8, 2013 11:58
Vagrant shell script for LAMP.
#!/usr/bin/env bash
apt-get update
echo mysql-server-5.5 mysql-server/root_password password PASSWORD | debconf-set-selections
echo mysql-server-5.5 mysql-server/root_password_again password PASSWORD | debconf-set-selections
apt-get install -y mysql-common mysql-server mysql-client
apt-get install -y apache2
@riywo
riywo / gist:5000181
Created February 20, 2013 22:15
How to delete git remote(origin) branch or tag?
# branch
$ git branch -d BRANCH # delete local BRANCH
$ git push origin :BRANCH # delete remote BRANCH
# tag
$ git tag -d TAG # delete local TAG
$ git push origin :refs/tags/TAG # delete remote TAG
#!/bin/sh
# 1. Sign up at https://www.digitalocean.com
# 2. Go to: https://www.digitalocean.com/droplets
# 3. Create Ubuntu 12.10 x64 server droplet
# 4. Get email with root credentials, IP and password
# 5. Open terminal on a Mac
# 6. SSH into into server as root: ssh -l root IPADDRESS-FROM-EMAIL
# 7. Enter root Password
# 8. Create this script: nano deployd-install.sh