Skip to content

Instantly share code, notes, and snippets.

View superRaytin's full-sized avatar

Leon Shi superRaytin

View GitHub Profile
@kingkool68
kingkool68 / changelog.sh
Last active September 17, 2023 21:08
Bash script to generate a markdown change log of GitHub pull requests between tagged releases
#!/bin/bash
# Generate a Markdown change log of pull requests from commits between two tags
# Author: Russell Heimlich
# URL: https://gist.github.com/kingkool68/09a201a35c83e43af08fcbacee5c315a
# HOW TO USE
# Copy this script to a directory under Git version control
# Make the script executable i.e. chmod +x changelog.sh
# Run it! ./changelog.sh
# Check CHANGELOG.md to see your results
@janlay
janlay / README.md
Last active March 4, 2024 05:25
Yet another config for Surge.app

Install

  1. Modify index.txt with your output path and proxy info
  2. Use Text Builder to build configuration for Surge: $ text-builder -index /path/to/index.txt Or run $ sh build-all to build all your index files.
  3. Import configuration via AirDrop/iTunes/Dropbox/iCloud

本人不提供任何保证和技术支持,使用者自负风险。
There are no guarantees, no any support. Use it at your own risk.

@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@transitive-bullshit
transitive-bullshit / image-service.js
Last active November 12, 2021 12:22
Angular service to resize images with antialiasing for use with canvas.
angular.module('demo').service('imageService', function ($http, $q, $timeout) {
var NUM_LOBES = 3
var lanczos = lanczosGenerator(NUM_LOBES)
// resize via lanczos-sinc convolution
this.resize = function (img, width, height) {
var self = { }
self.type = "image/png"
self.quality = 1.0
var twilio = require('twilio'),
SerialPort = require("serialport").SerialPort,
express = require('express');
var app = express();
function sendMessage(res, message) {
var resp = new twilio.TwimlResponse();
resp.message(message);
res.type('text/xml');
@miklschmidt
miklschmidt / server.coffee
Created July 1, 2013 18:42
Scripts for making autoupdates in node-webkit for Linux and Windows. This is a very early work in progress, more like a proof of concept. TODO: Add OS X support. Check for and notify about filelocks. Use a real db. Abstract out update logic into strategies (node-webkit, assets, updater). Use semver for version handling. Changelogs in Markdown. P…
fs = require('fs')
http = require('http')
https = require('https')
express = require('express')
path = require 'path'
_ = require('underscore')
sessionToken = "secretString"
secretUploadPass = "Change me"
secretPass = "Change me too"
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
/*
* Javascript EXIF Reader 0.1.4
* Copyright (c) 2008 Jacob Seidelin, cupboy@gmail.com, http://blog.nihilogic.dk/
* Licensed under the MPL License [http://www.nihilogic.dk/licenses/mpl-license.txt]
*/
var EXIF = {};
(function() {
@tmcgilchrist
tmcgilchrist / git-rebase.markdown
Created February 10, 2012 02:58
Git rebase workflow

Checkout a new working branch

 git checkout -b <branchname>

Make Changes

 git add
 git commit -m "description of changes"

Sync with remote