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
let info : Dictionary<String, AnyObject!> = ... | |
var theId : String? | |
let reponseObj = info["response"] | |
if let response = reponseObj as? Dictionary<String, AnyObject!> | |
{ | |
let idObj = response["id"] | |
if let id = idObj as? String | |
{ | |
theId = id | |
} |
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
Model.inDatabaseSync() { (db) in | |
let rs = db.executeQuery("SELECT * FROM model ORDER BY foo”, withArgumentsInArray:[]) | |
self.results = Model.instancesFromResultSet(rs) | |
} |
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
#!/usr/bin/env ruby -wKU | |
require 'nokogiri' | |
require 'time' | |
receipt_file = ARGV.shift || '' | |
if receipt_file.empty? | |
puts "please point me to your receipt file" | |
exit 1 | |
end |
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
-[__NSCFCalendar rangeOfUnit:inUnit:forDate:]: date cannot be nil | |
I mean really, what do you think that operation is supposed to mean with a nil date? | |
An exception has been avoided for now. | |
A few of these errors are going to be reported with this complaint, then further violations will simply silently do whatever random thing results from the nil. | |
Here is the backtrace where this occurred this time (some frames may be missing due to compiler optimizations): |
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
The enclosed config.xml file will instruct Jenkins to check out and build llvm + clang, archiving the resulting clang binary. | |
The configuration will build daily and will retain builds for 5 days. | |
To add it to your Jenkins install, just copy the config.xml file to e.g.: | |
jobs/Clang/config.xml | |
Then "reload configuration" in Jenkins, or stop and start Jenkins to reload it implicitly. |
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
// | |
// ASMBlurredImageBackgroundView.h | |
// Created by Andy Molloy on 4/19/13. | |
// | |
// | |
#import <UIKit/UIKit.h> | |
@interface ASMBlurredImageBackgroundView : UIView | |
@property (nonatomic, assign) double constant; |
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
#!/usr/bin/perl -w | |
use strict; | |
use local::lib; | |
use File::Basename; | |
use File::Util qw(escape_filename); | |
use File::Path qw(make_path); | |
use File::Spec; | |
use Getopt::Long; |
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
{ | |
"title": "PICO-8", | |
"tagline": "PICO-8 Fantasy Computer", | |
"description": "PICO-8 is a fantasy console for making, sharing and playing tiny games and other computer programs. When you turn it on, the machine greets you with a commandline and simple built-in tools for creating your own cartridges and exploring the PICO-8 cartverse.", | |
"slug": "pico-8", | |
"icon": "/usr/local/pico-8/lexaloffle-pico8.png", | |
"colour": "#34495E", | |
"categories": ["code"], |
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
#!/bin/bash | |
if [ ! -d "$1" ]; then | |
echo Unknown directory $1, aborting. | |
exit 1 | |
fi | |
re='^[0-9]+$' | |
if ! [[ $2 =~ $re ]]; then | |
echo Second argument must be the port number. Abording. |
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
#!/bin/bash | |
sudo apt-get remove -y libopencv-dev libvisionworks-dev libvisionworks-samples libvisionworks-sfm-dev libvisionworks-tracking-dev | |
sudo apt-get update && sudo apt-get -y dist-upgrade | |
sudo apt-get install -y curl python-pip python3-pip libffi-dev python-openssl | |
sudo -H pip install -U jetson-stats | |
# Follow instructions from https://www.thespaghettidetective.com/blog/2020/04/19/jetson-nano-spaghetti-detective-guide/ | |
# except use my fork. | |
wget https://github.com/nefilim/docker-compose-aarch64/releases/download/1.25.4/docker-compose-Linux-aarch64 |