Skip to content

Instantly share code, notes, and snippets.

View jae-jae's full-sized avatar
🏠
Working from home

Jaeger jae-jae

🏠
Working from home
  • China
View GitHub Profile
@ogrrd
ogrrd / dnsmasq OS X.md
Last active April 16, 2024 20:28
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@levelsio
levelsio / gist:5bc87fd1b1ffbf4a705047bebd9b4790
Last active April 13, 2024 17:00
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
@adamjimenez
adamjimenez / gist:5917897
Created July 3, 2013 13:36
Generate thumbnails from video files using HTML5's video tag and canvas
<?php
//where you want your thumbnails to go
$thumbs_dir = 'uploads/thumbs/';
//this should be an array of video paths
$videos = array();
if( $_POST["name"] ){
// Grab the MIME type and the data with a regex for convenience
if (!preg_match('/data:([^;]*);base64,(.*)/', $_POST['data'], $matches)) {
@mozillazg
mozillazg / supervisord.service
Last active December 1, 2023 12:59 — forked from tonyseek/supervisord.service
install and configure supervisord on centos 7.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf
ExecReload=/bin/supervisorctl reload
ExecStop=/bin/supervisorctl shutdown
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@linjunjj
linjunjj / gitlab
Created August 25, 2019 15:31
批量下载gitlab代码
from urllib.request import urlopen
import json
import subprocess, shlex
import time
import os
gitlabToken = 'your gitlab_token'
gitlabAddr = 'your gitlab address'
target = 'your gitlab project groups name'