Skip to content

Instantly share code, notes, and snippets.

View dulacp's full-sized avatar
🎯
Focusing

Pierre Dulac dulacp

🎯
Focusing
View GitHub Profile
@dulacp
dulacp / libzthread.sh
Created March 3, 2015 00:46
Download & Compile ZThread for iOS (all architectures)
# Builds a ZThread 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 libzthread 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 libzthread you want to build, shove it in the
# same directory as this script, and run "./libzthread.sh". Grab a cuppa. And voila.
@dulacp
dulacp / libexiv2.sh
Created March 3, 2015 02:52
Download & Compile Exiv2 for iOS (all architectures)
# Builds a Exiv2 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 libexiv2 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 libexiv2 you want to build, shove it in the
# same directory as this script, and run "./libexiv2.sh". Grab a cuppa. And voila.
@dulacp
dulacp / aws_s3_user_policy.sh
Created March 22, 2015 19:17
AWS S3 Policy to give access to one user to one bucket
USERNAME="your-username"
BUCKETNAME="my-awesome-bucket-name"
aws iam put-user-policy --user-name $USERNAME --policy-name AmazonS3FullAccess-$USERNAME --policy-document '{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket",
@dulacp
dulacp / gist:cb6ba6d0ceeeac7539e7
Created June 5, 2015 14:37
Smooth parallax scrolling
var geometry = {};
geometry.scrollTop = function(win, doc) {
if (win.pageYOffset !== undefined) {
return win.pageYOffset;
} else {
return Math.max(doc.documentElement.scrollTop, doc.body.scrollTop);
}
};
@dulacp
dulacp / sync.sh
Created August 1, 2015 12:10
Synchronize two AWS buckets
aws s3 sync s3://source-bucket s3://destination-bucket --acl=bucket-owner-full-control --source-region <region> --region <destination-region>
# 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 / keybase.md
Last active November 27, 2017 10:50

Keybase proof

I hereby claim:

  • I am dulacp on github.
  • I am dulaccc (https://keybase.io/dulaccc) on keybase.
  • I have a public key whose fingerprint is 10B3 54B6 F5C5 1E34 6FD9 A800 16C8 459A 0397 834C

To claim this, I am signing this object:

@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>
<style>
.iframe-container {
background: #ccc;
position: relative;
height: 0;
padding-bottom: 75%; /* 4/3 on mobile, padding = 3/4 */
}
.iframe-container iframe {
position: absolute;
top: 0;
@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