This file contains hidden or 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
enum Keys: String, CaseIterable { | |
case nicknames = "Nicknames" | |
case calendars = "Calendars" | |
case born = "Born" | |
} | |
let kvView = KVView<Keys>() | |
kvView[.nicknames].value = event.aggregatedNicknamesDescription | |
kvView[.calendars].value = event.aggregatedCalendarsDescription | |
kvView[.born].value = formatter.string(from: birthdate) |
This file contains hidden or 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 UIKit | |
import CoreData | |
import os | |
class FetchedCollectionViewCell<DataObject>: UICollectionViewCell { | |
static var identifier: String { String(describing: Self.self) } | |
func update(_: DataObject) { | |
fatalError() | |
} |
This file contains hidden or 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 -x | |
# say -v Daniel `curl -s http://whatthecommit.com/index.txt` | |
RANDOM_FILE=$(shuf -n 1 <(find . -name "*strings" ! -path "*DerivedData*" ! -path "*git*" -path "*Localizable*")) | |
LANGUAGE_CODE=$(echo "${RANDOM_FILE}" | sed -E 's#.*/(.*)\.lproj.*#\1#' | tr '-' '_') | |
if [ ${#LANGUAGE_CODE} -eq 2 ] ; then | |
LANGUAGE_CODE="${LANGUAGE_CODE}_" | |
fi |
This file contains hidden or 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> | |
<meta charset="UTF-8" /> | |
<style> | |
html{font-family: Avenir-Book;} | |
h1{font-size: 16px;} | |
@page {size: A3; margin: 0mm 0mm 0mm 0mm;} | |
@media print { | |
.month{ | |
page-break-after: always; |
This file contains hidden or 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 | |
set -x | |
curl -v -XPUT -d "{ | |
\"workflow_id\": \"${BITRISE_TRIGGERED_WORKFLOW_ID}\", | |
\"workflow_title\": \"${BITRISE_TRIGGERED_WORKFLOW_TITLE}\", | |
\"pr\": \"${PR}\", |
This file contains hidden or 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 | |
// Put your alert message here: | |
$message = "Message"; | |
$pemfile = $argv[1]; | |
$token = $argv[2]; | |
$subscriptionID = $argv[3]; | |
if (!$subscriptionID) |
This file contains hidden or 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 startLocations: [NSNumber] = [ 0.0, 0.05, 0.25, 0.3] | |
let endLocations: [NSNumber] = [ 0.7, 0.75, 0.95, 1] | |
gradient.startPoint = CGPoint(x: -0, y: 0.5) | |
gradient.endPoint = CGPoint(x: 1, y: 0.5) | |
gradient.colors = [ UIColor.white.cgColor, UIColor.tetraDarkBlue.cgColor, UIColor.tetraDarkBlue.cgColor, UIColor.white.cgColor ] | |
gradient.locations = startLocations | |
layer.insertSublayer(gradient, at: 0) |
This file contains hidden or 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
apt-get install build-essential module-assistant linux-headers-`uname -r` dkms | |
m-a prepare | |
sh /media/$USER/VBOXADDITIONS_4.3.28_100309/VBoxLinuxAdditions.run | |
reboot |