Skip to content

Instantly share code, notes, and snippets.

View graouts's full-sized avatar

Antoine Quint graouts

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>touch-action</title>
<style>
body {
margin: 0;

Keybase proof

I hereby claim:

  • I am graouts on github.
  • I am graouts (https://keybase.io/graouts) on keybase.
  • I have a public key whose fingerprint is 808A 0E65 BF93 0ECD 4363 3966 9244 4650 A398 4665

To claim this, I am signing this object:

@graouts
graouts / TestWebView.swift
Last active August 29, 2015 14:05
Subclassing a WKWebView in Swift, non-functional as of Xcode6-Beta6
import Cocoa
import WebKit
class TestWebView : WKWebView {
override init(frame frameRect: NSRect) {
super.init(frame: frameRect, configuration: WKWebViewConfiguration())
}
override init(coder: NSCoder) {
@graouts
graouts / inheritance.js
Last active August 29, 2015 13:56
Example of very simple JavaScript inheritance using JS core features only, following the style used in the WebKit Web Inspector.
function Bar(someParam)
{
// Call the superclass's constructor
Foo.call(this, someParam);
// Bar-specific initialization follows…
this._property = null;
}
// Some constants.
Sampling process 89738 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling TextMate (pid 89738) every 1 millisecond
Process: TextMate [89738]
Path: /Applications/TextMate.app/Contents/MacOS/TextMate
Load Address: 0x10e999000
Identifier: com.macromates.TextMate.preview
Version: 2.0.0-alpha.9365 (9365)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
@graouts
graouts / gist:3958538
Created October 26, 2012 12:40
Sample of TextMate 2
This file has been truncated, but you can view the full file.
Sampling process 71637 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling TextMate (pid 71637) every 1 millisecond
Process: TextMate [71637]
Path: /Applications/TextMate 2.app/Contents/MacOS/TextMate
Load Address: 0x10e8a3000
Identifier: com.macromates.TextMate.preview
Version: 2.0.0-alpha.9319 (9319)
Code Type: X86-64 (Native)
Parent Process: launchd [138]
@graouts
graouts / sim-launch-notification.js
Created September 28, 2012 09:16
Launching the iOS Simulator and receiving a notification when it's ready (Node.js)
var $ = require('NodObjC');
$.framework('Foundation');
// get the distributed notification center
var notificationCenter = $.NSDistributedNotificationCenter('defaultCenter');
// this is the observer and the single method we register as the notification
var observer = {
receivedNotification : function (notification) {
@graouts
graouts / curl.js
Created August 14, 2012 14:02
Loading SyntaxHighlighter with curl.js
(function(){/*
MIT License (c) copyright B Cavalier & J Hann */
var i=void 0,m=!0,o=null,p=!1,s=this.window||global;function aa(){}function t(a,b){return 0==ba.call(a).indexOf("[object "+b)}function v(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function w(a,b){var c,d,e;d=1;a=a.replace(ca,function(a,b,c,h){c&&d++;e=m;return h||""});return e?(c=b.split("/"),c.splice(c.length-d,d),c.concat(a||[]).join("/")):a}function da(a){var b=a.indexOf("!");return{Q:a.substr(b+1),m:0<=b&&a.substr(0,b)}}function y(){}
function z(a,b){y.prototype=a||ea;var c=new y;y.prototype=ea;for(var d in b)c[d]=b[d];return c}function A(){function a(a,b,c){d.push([a,b,c])}function b(a,b){for(var c,e=0;c=d[e++];)(c=c[a])&&c(b)}var c,d,e;c=this;d=[];e=function(c,g){a=c?function(a){a&&a(g)}:function(a,b){b&&b(g)};e=aa;b(c?0:1,g);b=aa;d=B};this.z=function(b,d,e){a(b,d,e);return c};this.d=function(a){c.w=a;e(m,a)};this.b=function(a){c.ma=a;e(p,a)};this.u=function(a){b(2,a)}}function C(a,b,c,d){a instanceof A?a.z(b,c,d):b(a)
@graouts
graouts / gist:2022070
Created March 12, 2012 13:52
`brew doctor` output
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/DependencyWatcher.dylib /usr/local/lib/liboainject.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
@graouts
graouts / gist:2022020
Created March 12, 2012 13:46
Issue installing libass package with brew (dependency for ffmpeg)
==> Installing ffmpeg dependency: libass
==> Downloading http://libass.googlecode.com/files/libass-0.10.0.tar.gz
File already downloaded in /Library/Caches/Homebrew
/usr/bin/tar xf /Library/Caches/Homebrew/libass-0.10.0.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/libass/0.10.0
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/libass/0.10.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d