Skip to content

Instantly share code, notes, and snippets.

View bramus's full-sized avatar

Bramus bramus

View GitHub Profile
#!/bin/bash
PLATFORM=iPhoneOS # iPhoneSimulator # iPhoneOS
HOST=arm-apple-darwin # i386-apple-darwin10 # arm-apple-darwin10
ARCH=arm64 # i386 # armv7s #armv7
SDK_VERSION=13.0
XCODE_ROOT=`xcode-select -print-path`
PLATFORM_PATH=$XCODE_ROOT/Platforms/$PLATFORM.platform/Developer
SDK_PATH=$PLATFORM_PATH/SDKs/$PLATFORM$SDK_VERSION.sdk
@jedi4ever
jedi4ever / patrick-unomaly.md
Last active February 22, 2019 09:40
Impression of 1 week exchange

I had a long overdue holiday planned. For many people this would mean going somewhere and relax. Turns out I'm not the sight-seeing person , I'm more of a people-seeing person: talking to people and exchanging new ideas is what makes me tick. Having been a consultant for several years, you learn the most from new environments. Interns would have that opportunity to apply , but why can't people with more experience?

So I launched on twitter the idea of what company is willing to do an exchange. After receiving several replies I got invited by Ramon Van Alteren from Unomaly and deciced to take a leap of faith.

It felt like the excitement of starting a new job. Scary , because you don't know what to expect.

@rhukster
rhukster / sphp.sh
Last active March 30, 2024 10:41
Easy Brew PHP version switching (Now moved to https://github.com/rhukster/sphp.sh)
#!/bin/bash
# Creator: Phil Cook
# Modified: Andy Miller
#
# >>> IMPORTANT: Moved to: https://github.com/rhukster/sphp.sh
# >>> Kept here for legacy purposes
#
osx_major_version=$(sw_vers -productVersion | cut -d. -f1)
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2)
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3)
@shospodarets
shospodarets / Chrome headless Puppeteer- capture DOM element screenshot using
Last active January 17, 2023 18:52
Chrome headless Puppeteer- capture DOM element screenshot using
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Adjustments particular to this page to ensure we hit desktop breakpoint.
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1});
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'});
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active April 11, 2024 15:02
React Native Bridging Cheatsheet
/**
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
*
* This patch works around iOS9 UIWebView regression that causes infinite digest
* errors in Angular.
*
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular
* have the workaround baked in.
*
* To apply this patch load/bundle this file with your application and add a
@danielgtaylor
danielgtaylor / gist:0b60c2ed1f069f118562
Last active April 2, 2024 20:18
Moving to ES6 from CoffeeScript

Moving to ES6 from CoffeeScript

I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.

In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.

While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.

Punctuation

Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio

@adisuryadi
adisuryadi / compile.sh
Last active November 28, 2021 00:16
Run ES6/ES2016/ES2017 in Coderunner (using babel)
#!/bin/bash
#
# This script will transplie our code using babel and evaluates it using node.js
#
# Steps:
# 1) Install babel globally:
# npm install -g babel-cli
# or
# yarn global add babel-cli
# 2) Create a new language in Coderunner preferences (eg. Javascript (Babel)).
@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@NielsLeenheer
NielsLeenheer / Samsung Browser
Last active June 23, 2020 11:33
Samsung Browser
Note: Some older devices such as the Galaxy S III did not get the Chromium based browser with
the update to Android 4.2 or later. When Samsung later introduced the Galaxy S3 Neo it did get
the new browser.
Note: With the Android 4.3 release and version 1.5 of the Chromium browser, Samsung did not
enable WebAudio API for the Note 3. All other devices did get the WebAudio API.
Note: Samsung did not update the browser version with the upgrade from Android 4.3 to 4.4,
but did add getUserMedia and WebRTC functionality.