Skip to content

Instantly share code, notes, and snippets.

@mendelgusmao
mendelgusmao / btsync
Last active March 4, 2021 15:37
init.d script for btsync (based on another script built to run dropbox)
#!/bin/sh
### BEGIN INIT INFO
# Provides: btsync
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Multi-user daemonized version of btsync.
@lavoiesl
lavoiesl / object.create.js
Created September 20, 2013 18:49
Javascript Object.create() polyfill
// http://jsperf.com/new-vs-object-create-including-polyfill
if (typeof Object.create !== 'function') {
Object.create = function(o, props) {
function F() {}
F.prototype = o;
if (typeof(props) === "object") {
for (prop in props) {
if (props.hasOwnProperty((prop))) {
F[prop] = props[prop];
import gifAnimation.*;
PFont font;
GifMaker gifExport;
PImage[] frames;
PImage img;
void setup() {
gifExport = new GifMaker(this, "export.gif");
gifExport.setRepeat(0);
@TomByrne
TomByrne / MultiExporter.jsx
Last active June 14, 2024 09:48
An Illustrator script for exporting layers and/or artboards into separate files (PNG8 / PNG24 / EPS / PDF / SVG / JPG / FXG).See http://www.tbyrne.org/export-illustrator-layers-to-svg-files
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
//
// Copyright 2013 Tom Byrne
// Comments or suggestions to tom@tbyrne.org
@h0tw1r3
h0tw1r3 / aria2.daemon
Last active April 16, 2024 22:30
Aria2c systemd service
continue
dir=/var/www/downloads
file-allocation=falloc
max-connection-per-server=4
max-concurrent-downloads=2
max-overall-download-limit=0
min-split-size=25M
rpc-allow-origin-all=true
rpc-secret=YouShouldChangeThis
input-file=/var/tmp/aria2c.session
@peace098beat
peace098beat / AtFI.jsx
Created October 22, 2014 05:13
[AE] UI関連スクリプト その1
/*-------------------------------------------------------------------------------------------------------*/
/*
■Name tr_AtFI
■ver0.1 
■20090211 
■Author Matsuda(Expresson) &Terraon(Script&Icon)
□選択レイヤとその”一つ下”のレイヤの重複部分frフェードインを行います。
レイヤーコメントも追加します。また、既に透明度にエクスプレッションが適用されている場合は効果を”リセット”します。
■All Rights @ Free
拙いコードですが引用も転用もご自由に。
@branneman
branneman / prototypal-inheritance.js
Last active October 18, 2021 06:18
ES3 & ES5 — Prototypal Inheritance
/**
* Parent
*/
function Shape(x, y) {
this.x = x;
this.y = y;
}
Shape.prototype.constructor = Shape;
Shape.prototype.pos = function() {
return [this.x, this.y];
anonymous
anonymous / dribbble.js
Created August 24, 2017 06:43
// ==UserScript==
// @name dribbble show big picture
// @namespace dribbble
// @include http*://*dribbble.com*
// @version 1
// ==/UserScript==
(function(){
var callback = function(e){
e = e.target ;
@yone80
yone80 / roll.js
Last active August 21, 2018 10:21
Roll - Aftereffects Expression
numsegments = Math.max(2, Math.floor(effect("Segments")("Slider")));
totallength = Math.max(0.001, effect("Line Length")("Slider"));
seglength = totallength / numsegments;
sepdist = Math.max(0.001, effect("Seperation Distance")("Slider") * 0.5) / (Math.PI * 2);
roll = clamp(effect("Roll")("Slider"), 0, 1);
pos = [0, 0];
cv = [];
firsttheta = Math.sqrt(numsegments * seglength / sepdist);
/*
パスを延長 Copyright (c) koji sakai
https://gist.github.com/S4K4K0/62896e92287b40fded0d7f1614082d22
プレビュー部分やUIは以下のサンプルを元にしています
https://qiita.com/shspage/items/441ccf61394d9c504beb
* HOW TO USE
選択して実行するとスライダーが表示され、始端か終端のセグメントに対して指定した比率でBezier曲線のパラメータが延長されます
(サイズや長さがそのままk倍になるわけではありません)