spec/_role
以下にspecファイルを分離してみた.
$ tree spec/
spec/
├── _role
│ ├── cloudforecast_spec.rb
│ ├── growthforecast_spec.rb
#!/bin/sh | |
# | |
# Copyright (c) 2010 Shinnosuke Suzuki <sasasin@sasasin.net> | |
# You can distribute this file under the GPL. | |
# | |
# Modified by TADA Tadashi <t@tdtds.jp> | |
# | |
FILE=$1 | |
if [ -z $FILE ]; then | |
echo usage: pdf2kindle PDFfile [top bottom left right] |
""" | |
Nice fake South database driver in case you are mixing supported/unsupported databases. | |
Usage: Update your settings.py | |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.mysql', | |
'NAME': 'mydb', | |
'USER': 'mydb', |
#!/bin/sh | |
export LANG=C | |
testURLContentsChange() | |
{ | |
sysctl xen.independent_wallclock=1 | |
TEST_URL="http://www.example.com/" | |
TODAY_START_DATE=`date +'%Y-%m-%d 00:00:00'` |
import struct | |
import zlib | |
import itertools | |
class bitstream(object): | |
def __init__(self, buf): | |
self.buf = buf | |
self.i = 0 | |
self.rem = 0 | |
self.n = 0 |
// Modified from: https://github.com/katleta3000/CancelBlocks/blob/master/CancelBlocks.swift | |
typealias dispatch_cancelable_block_t = (cancel: Bool) -> (Void) | |
private func dispatch_after_delay(delay: Double, queue: dispatch_queue_t, block: dispatch_block_t?) -> dispatch_cancelable_block_t? { | |
guard let block = block else { return nil } | |
var originalBlock: dispatch_block_t? = block | |
var cancelableBlock: dispatch_cancelable_block_t? = nil | |
let delayBlock: dispatch_cancelable_block_t = {(cancel: Bool) -> Void in | |
if let originalBlock = originalBlock where !cancel { |
from machine import UART | |
import micropyGPS | |
import utime, gc, _thread | |
from m5stack import lcd | |
from math import radians, sin, cos | |
gps_s = UART(2, tx=17, rx=16, baudrate=9600, timeout=200, buffer_size=256, lineend='\r\n') | |
micropyGPS.MicropyGPS.supported_sentences.update({'GNGSA': micropyGPS.MicropyGPS.gpgsa}) | |
gps = micropyGPS.MicropyGPS(9, 'dd') |
+ (NSString *)encodeStringWithCoordinates:(NSArray *)coordinates | |
{ | |
NSMutableString *encodedString = [NSMutableString string]; | |
int val = 0; | |
int value = 0; | |
CLLocationCoordinate2D prevCoordinate = CLLocationCoordinate2DMake(0, 0); | |
for (NSValue *coordinateValue in coordinates) { | |
CLLocationCoordinate2D coordinate = [coordinateValue MKCoordinateValue]; | |
--- | |
language: objective-c | |
before_script: | |
- ./scripts/travis/add-key.sh | |
after_script: | |
- ./scripts/travis/remove-key.sh | |
after_success: | |
- ./scripts/travis/testflight.sh | |
env: | |
global: |