Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am marcboquet on github.
  • I am marcboquet (https://keybase.io/marcboquet) on keybase.
  • I have a public key whose fingerprint is EF29 CCE0 313F FB96 0EB7 5332 9B1B 824C 461F F0B3

To claim this, I am signing this object:

@marcboquet
marcboquet / gist:340c240c50aed6c71a1e
Created August 8, 2014 15:37
Create empty Swift playground files
#! /usr/bin/ruby
require 'pathname'
platform = "iphonesimulator" # or "macosx"
contents_xcplayground = <<XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='1.0' sdk='#{platform}'>
<sections>
<code source-file-name='section-1.swift'/>
</sections>
@marcboquet
marcboquet / Breakpoints_v2.xcbkptlist
Created November 15, 2013 16:06
Shared breakpoint to automatically start Reveal server on the iOS Simulator. Based on @orj post: http://blog.ittybittyapps.com/blog/2013/11/07/integrating-reveal-without-modifying-your-xcode-project/
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "4"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
@marcboquet
marcboquet / Variables.plist
Created July 16, 2013 15:50
Soulver variables useful for iOS design. Based on ‏@marcedwards post: http://bjango.com/articles/soulver/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SKVariables</key>
<array>
<dict>
<key>enabled</key>
<true/>
<key>name</key>
@marcboquet
marcboquet / paymill_tokens.html
Created December 8, 2012 16:21
Generate paymill tokens
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript">
var PAYMILL_PUBLIC_KEY = 'your_public_paymill_key';
</script>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="https://bridge.paymill.com/"></script>
<script type="text/javascript">
$(document).ready(function () {
# include this in application controller
module Authentication
protected
# Inclusion hook to make #current_user and #signed_in?
# available as ActionView helper methods.
def self.included(base)
base.send :helper_method, :current_user, :signed_in?, :authorized? if base.respond_to? :helper_method
end
# Returns true or false if the user is signed in.