Skip to content

Instantly share code, notes, and snippets.

@dulacp
dulacp / libtiff.sh
Created February 28, 2015 01:14
Download & Compile Libtiff for iOS (all architectures)
# Builds a Libtiff framework for the iPhone and the iPhone Simulator.
# Creates a set of universal libraries that can be used on an iPhone and in the
# iPhone simulator. Then creates a pseudo-framework to make using libtiff in Xcode
# less painful.
#
# To configure the script, define:
# IPHONE_SDKVERSION: iPhone SDK version (e.g. 8.1)
#
# Then go get the source tar.bz of the libtiff you want to build, shove it in the
# same directory as this script, and run "./libtiff.sh". Grab a cuppa. And voila.
@dulacp
dulacp / libz.sh
Created February 28, 2015 01:25
Download & Compile Libz (zlib) for iOS (all architectures)
# Builds a ZLib framework for the iPhone and the iPhone Simulator.
# Creates a set of universal libraries that can be used on an iPhone and in the
# iPhone simulator. Then creates a pseudo-framework to make using libz in Xcode
# less painful.
#
# To configure the script, define:
# IPHONE_SDKVERSION: iPhone SDK version (e.g. 8.1)
#
# Then go get the source tar.bz of the libz you want to build, shove it in the
# same directory as this script, and run "./libz.sh". Grab a cuppa. And voila.
@dulacp
dulacp / libjpeg.sh
Created February 28, 2015 00:57
Download & Compile Libjpeg for iOS (all architectures)
# Builds a Libjpeg framework for the iPhone and the iPhone Simulator.
# Creates a set of universal libraries that can be used on an iPhone and in the
# iPhone simulator. Then creates a pseudo-framework to make using libjpeg in Xcode
# less painful.
#
# To configure the script, define:
# IPHONE_SDKVERSION: iPhone SDK version (e.g. 8.1)
#
# Then go get the source tar.bz of the libjpeg you want to build, shove it in the
# same directory as this script, and run "./libjpeg.sh". Grab a cuppa. And voila.
@dulacp
dulacp / opera.fen
Last active October 12, 2022 13:14
Opera Game FEN
rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1
rnbqkbnr/pppp1ppp/8/4p3/4P3/8/PPPP1PPP/RNBQKBNR w KQkq e6 0 2
rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2
rnbqkbnr/ppp2ppp/3p4/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 3
rnbqkbnr/ppp2ppp/3p4/4p3/3PP3/5N2/PPP2PPP/RNBQKB1R b KQkq d3 0 3
rn1qkbnr/ppp2ppp/3p4/4p3/3PP1b1/5N2/PPP2PPP/RNBQKB1R w KQkq - 1 4
rn1qkbnr/ppp2ppp/3p4/4P3/4P1b1/5N2/PPP2PPP/RNBQKB1R b KQkq - 0 4
rn1qkbnr/ppp2ppp/3p4/4P3/4P3/5b2/PPP2PPP/RNBQKB1R w KQkq - 0 5
rn1qkbnr/ppp2ppp/3p4/4P3/4P3/5Q2/PPP2PPP/RNB1KB1R b KQkq - 0 5
rn1qkbnr/ppp2ppp/8/4p3/4P3/5Q2/PPP2PPP/RNB1KB1R w KQkq - 0 6
@dulacp
dulacp / download.py
Created August 26, 2020 17:02
Download all images from Zenfolio
import os
import re
import requests
import zenapi
_dir_root = '~/Downloads/ZenfolioBackup'
def process_gallery(gallery, curr_dir):
@dulacp
dulacp / iframe.html
Last active October 21, 2020 08:03
360player iframe simple example
<script src="https://360player.io/static/dist/scripts/embed.js" defer></script>
<iframe src="https://360player.io/p/k6f7rb/" frameborder="0" width=560 height=315 allow="fullscreen; xr-spatial-tracking" data-token="k6f7rb"></iframe>
@dulacp
dulacp / Raspberry-WAP-config-steps.md
Last active August 29, 2020 05:04
Configure a Raspberry Pi 3 (Debian Jessie) as a isolated Wi-Fi Access Point

Raspberry as a standolone Wi-Fi Access Point

A reminder on how to configure a Raspberry Pi 3 (Debian Jessie) as a Wi-Fi Access Point

Find the Raspberry Pi ethernet ip-address

Instructions for the macOS platform, little trick to find the raspberry pi ip-address while connected through ethernet.

Connect the Raspberry Pi with an ethernet cable

# VERSION 1.0.4
# Author: @madhavajay
# This currently works for iOS and watchOS in the Simulator and Devices
# Changes
# Using ${TOOLCHAIN} in two places now
# Added double quotes " around paths
# Fixed watchOS Issues
# Instructions iOS
@dulacp
dulacp / libpng.sh
Last active December 7, 2019 07:54
Download & Compile Libpng for iOS (all architectures)
# Builds a Libpng framework for the iPhone and the iPhone Simulator.
# Creates a set of universal libraries that can be used on an iPhone and in the
# iPhone simulator. Then creates a pseudo-framework to make using libpng in Xcode
# less painful.
#
# To configure the script, define:
# IPHONE_SDKVERSION: iPhone SDK version (e.g. 8.1)
#
# Then go get the source tar.bz of the libpng you want to build, shove it in the
# same directory as this script, and run "./libpng.sh". Grab a cuppa. And voila.
@dulacp
dulacp / debounce.py
Created December 4, 2018 00:39 — forked from walkermatt/debounce.py
A debounce function decorator in Python similar to the one in underscore.js, tested with 2.7
from threading import Timer
def debounce(wait):
""" Decorator that will postpone a functions
execution until after wait seconds
have elapsed since the last time it was invoked. """
def decorator(fn):
def debounced(*args, **kwargs):
def call_it():