Skip to content

Instantly share code, notes, and snippets.

Avatar

Łukasz Wieczorek hilukasz

View GitHub Profile
@hilukasz
hilukasz / removeEmptyTextBoxes.jsx
Last active Sep 30, 2021
delete empty text boxes in illustrator
View removeEmptyTextBoxes.jsx
// Written By Łukasz Wieczorek - hellowoo.com
// you can destribute this freely via creative commons(http://creativecommons.org/licenses/by-sa/3.0/)
// but leave this message in tact, or give credit to original script.
var numberOfEmptyTextBoxes = 0;
var layersWithNoText = new Array();
if ( app.documents.length > 0 ) {
for ( i = 0; i < app.activeDocument.textFrames.length; i++ ) {
text = app.activeDocument.textFrames[i].textRange;
numWords = app.activeDocument.textFrames[i].words.length;
@hilukasz
hilukasz / Selected_layers-PS.jsx
Last active May 5, 2021
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') );
@hilukasz
hilukasz / unlockAllLayers_Photoshop.jsx
Last active May 5, 2021
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 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
View gist:2405695
<nav>
<div class="menu-main-container"><ul id="menu-main" class="menu"><li id="menu-item-19" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-19"><a href="http://localhost/tigerstudiov2/?page_id=5">Work</a></li>
<li id="menu-item-18" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-18"><a href="http://localhost/tigerstudiov2/?page_id=7">Company</a>
<ul class="sub-menu">
<li id="menu-item-21" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-21"><a href="#">test sub-item</a></li>
<li id="menu-item-22" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-22"><a href="#">item 2</a></li>
<li id="menu-item-23" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-23"><a href="http://adf">asfdasf</a></li>
<li id="menu-item-24" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-24"><a href="http://asdfasf">asdfasf</a></li>
</ul>
</li>
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;
View d3.js
var colorDepth = ["red", "green", "blue"];
node.append("circle")
.attr("r", function (d, idx) { return 6 / d.depth; })
.attr( "class", colorDepth[function (d, idx) { return d.depth }]);
View class.cpp
#include "motionTracker.h"
MotionTracker::MotionTracker(){
debugIsOn = false;
closestSensorIndex = 0;
}
void MotionTracker::setDebugOn(){
debugIsOn = true;