Skip to content

Instantly share code, notes, and snippets.

@sambatlim
sambatlim / save_image.js
Created July 25, 2021 07:30
Script to generate save image from each group in photoshop.
function Main() {
var num = 1;
for (var j = 0; j < app.activeDocument.layerSets[0].layers.length; j++) {
for (var k = 0; k < app.activeDocument.layerSets[1].layers.length; k++) {
for (var l = 0; l < app.activeDocument.layerSets[2].layers.length; l++) {
var groupChildArr1 = app.activeDocument.layerSets[0].layers;
var groupChildArr2 = app.activeDocument.layerSets[1].layers;
@OrganicIrradiation
OrganicIrradiation / SuperSleepyTempAndVolts.ino
Created March 23, 2015 10:27
Arduino FIO Internal Voltmeter and Thermometer
/*
* SuperSleepyTempAndVolts SuperSleepyTempAndVolts.ino
* Steven A Cholewiak - www.semifluid.com
*
* This sketch takes advantage of the XBee's hibernation mode as
* well as the Ardunio Fio's Power Save Mode to grossly reduce power
* consumption. Also uses some *supersecret* code to access the Arduino
* Fio's own voltage rail (http://code.google.com/p/tinkerit/wiki/SecretVoltmeter)
* and internal thermometer (http://code.google.com/p/tinkerit/wiki/SecretThermometer).
*
@iso2022jp
iso2022jp / sprintf.bas
Created May 28, 2014 04:27
sprintf for VB6: 若かりし頃のコード発掘
Option Explicit
Public Declare Sub MoveMemory Lib "kernel32.dll" Alias "RtlMoveMemory" ( _
Destination As Any, _
Source As Any, _
ByVal Length As Long)
Public Function sprintf(ByRef FormatString As String, ParamArray Arguments() As Variant) As String
Dim h As OLE_HANDLE
Dim hTerm As OLE_HANDLE
@njh
njh / readMacAddress.ino
Last active November 19, 2020 21:48
Arduino sketch to read the MAC address from a AT24MAC402
/*
Arduino Sketch that demonstrates reading the factory-programmed
EUI-48 MAC Address from a AT24MAC402 / AT24MAC602 Serial EEPROM
over TWI / I2C.
Product page: http://www.atmel.com/devices/AT24MAC402.aspx
Datasheet: http://www.atmel.com/images/atmel-8807-seeprom-at24mac402-602-datasheet.pdf
*/
#include <Wire.h>
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>