This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
DEFINE('BASE_PATH', '.'); | |
//relative to where you are running this script from. All paths below are relative to this | |
DEFINE('P12_FILE', 'My Certificate.p12'); | |
//your Pass Certificate, exported from Keychain Access as a P12 file | |
DEFINE('P12_PASSWORD', ''); | |
//if you exported your P12 with a password, enter it here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TopAlignedFlowLayout.swift | |
// | |
// Copyright © 2015 Sean Kasun | |
// | |
// Add TopAlignedFlowLayout.swift to your project, then in your storyboard, | |
// change the Collection View's Layout to "Custom" and set the Class | |
// to "TopAlignedFlowLayout". Boom. | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hello, hope you find this code useful | |
package main | |
import ( | |
// this is a deprecated oauth lib from godoc.org | |
// i was going to use the new one (https://godoc.org/golang.org/x/oauth2/google) | |
// but due to a bug i've found and filed at github | |
// i decided to revert to the old one instead until the new one is stable | |
"code.google.com/p/goauth2/oauth/jwt" | |
"encoding/json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIColor { | |
static var accent: UIColor { | |
UIColor(named: "Accent")! | |
} | |
static var primary: UIColor { | |
UIColor(named: "Primary")! | |
} | |
static var primaryText: UIColor { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<Data> | |
<Series> | |
<id>83462</id> | |
<Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors> | |
<Airs_DayOfWeek>Monday</Airs_DayOfWeek> | |
<Airs_Time>10:00 PM</Airs_Time> | |
<ContentRating>TV-PG</ContentRating> | |
<FirstAired>2009-03-09</FirstAired> | |
<Genre>|Drama|</Genre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://ruby-doc.org/stdlib-2.0.0/libdoc/open-uri/rdoc/OpenURI.html | |
require 'open-uri' | |
# https://github.com/flori/json | |
require 'json' | |
# http://stackoverflow.com/questions/9008847/what-is-difference-between-p-and-pp | |
require 'pp' | |
# Construct the URL we'll be calling | |
request_uri = 'http://localhost:3000/users.json' | |
request_query = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>A Trello Dashboard</title> | |
<link rel="stylesheet" media="screen" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>Trello Dashboard</h1> | |
<form class="form-horizontal" id="boards_form"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// (string) $message - message to be passed to Slack | |
// (string) $room - room in which to write the message, too | |
// (string) $icon - You can set up custom emoji icons to use with each message | |
public static function slack($message, $room = "engineering", $icon = ":longbox:") { | |
$room = ($room) ? $room : "engineering"; | |
$data = "payload=" . json_encode(array( | |
"channel" => "#{$room}", | |
"text" => $message, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import subprocess | |
import tempfile | |
import urllib | |
text = sys.stdin.read() | |
chart_url_template = ('http://chart.apis.google.com/chart?' | |
'cht=qr&chs=300x300&chl={data}&chld=H|0') | |
chart_url = chart_url_template.format(data=urllib.quote(text)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// String+HTML.swift | |
// AttributedString | |
// | |
// Created by Costantino Pistagna on 08/11/2017. | |
// Copyright © 2017 sofapps.it All rights reserved. | |
// | |
import UIKit | |
import Foundation |
OlderNewer