Skip to content

Instantly share code, notes, and snippets.

Łukasz Wieczorek hilukasz

Block or report user

Report or block hilukasz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lights.ino
int soundSensor = A1;
int relay = A2;
int relay2 = A3;
int relay3 = A4;
int relay4 = A5;
int claps = 0;
long detectionSpanInitial = 0;
long detectionSpan = 0;
boolean lightState = false;
View VICTORY.cpp
int soundSensor = A2;
int relay = A0;
int relay2 = A3;
int relay3 = A4;
int relay4 = A5;
int claps = 0;
long detectionSpanInitial = 0;
long detectionSpan = 0;
boolean clapState = false;
int doubleClap = 0;
View gist:90c1e8b96b645b9cba1c
int soundSensor = A2;
int relay = A0;
int relay2 = A3;
int relay3 = A4;
int relay4 = A5;
int claps = 0;
long detectionSpanInitial = 0;
long detectionSpan = 0;
boolean clapState = false;
int doubleClap = 0;
@hilukasz
hilukasz / Selected_layers-PS.jsx
Last active Sep 1, 2019
get array of selected layers in photoshop via extendscript
View Selected_layers-PS.jsx
var docRef = app.activeDocument;
cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };
function newGroupFromLayers(doc) {
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putClass( sTID('layerSection') );
View rotate.jsx
doc = app.activeDocument;
sel = doc.selection[0];
var rotate;
var numberOfObjects;
var radius;
initWindow();
@hilukasz
hilukasz / timer.js
Last active Aug 29, 2015
afterEffectsTimer.js
View timer.js
Heavily modified code from: http://forums.creativecow.net/thread/227/12722
timeToStart = 4;
text.sourceText = "4:59";
if (time >= timeToStart){
clockStart = 300;
function padZero(n){
if (n < 10) return "0" + n else return "" + n
}
@hilukasz
hilukasz / unlockAllLayers_Photoshop.jsx
Last active Mar 1, 2017
unlockAllLayers_Photoshop
View unlockAllLayers_Photoshop.jsx
// save as unlockAllLayers_Photoshop.jsx and put it in your scripts folder to see it in File > Scripts
var topLayer = app.activeDocument.layers[0];
app.activeDocument.activeLayer = topLayer;
do{
unlockLayer();
selectLayerBelow();
}while(topLayer != app.activeDocument.activeLayer)
function unlockLayer(){
if(app.activeDocument.activeLayer.isBackgroundLayer ) app.activeDocument.activeLayer.name = 'From Background';
View easing.cpp
float x;
float easing = 0.05;
float targetX = origin;
float dx = targetX - x;
if(abs(dx) > 1) {
x += dx * easing;
}
View ok.js
me.addSeed = function(_r,_a) {
var r = _r || 0;
var a = _a || 0;
var seed = new FIB.GoldenSeed(0,0);
seed.radius = seed.tradius = r;
seed.angle = seed.tangle = a;
me.seeds.unshift(seed);
return seed;
};
View 00globals.jsx
/**************************************************************************
*
* @@@BUILDINFO@@@ 00globals-2.jsx 3.5.0.43 20-November-2009
* ADOBE SYSTEMS INCORPORATED
* Copyright 2010 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying it.
* If you have received this file from a source other than Adobe, then your
You can’t perform that action at this time.