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
| #!/usr/bin/env python | |
| import sys, subprocess, re | |
| RX_SUITE_START = re.compile(r"Test Suite '(?P<suitename>\w+)' started at (?P<date>[\d\-]+) (?P<time>[\d\:]+) (?P<tz>[\d\-\+]+)") | |
| RX_SUITE_END = re.compile(r"Test Suite '(?P<suitename>\w+)' finished at (?P<date>[\d\-]+) (?P<time>[\d\:]+) (?P<tz>[\d\-\+]+)") | |
| RX_TEST_START = re.compile(r"Test Case '(?P<testname>[^']+)' started\.") | |
| RX_TEST_END = re.compile(r"Test Case '(?P<testname>[^']+)' passed \((?P<sec>[\d\.]+) seconds\)\.") | |
| RX_TEST_FAIL = re.compile(r"Test Case '(?P<testname>[^']+)' failed \((?P<sec>[\d\.]+) seconds\)\.") |
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 | |
| # https://gist.github.com/949831 | |
| # http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/ | |
| # command line OTA distribution references and examples | |
| # http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson | |
| # http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution | |
| # http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/ | |
| # http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html |
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
| type T struct { | |
| A int | |
| B string | |
| } | |
| t := T{23, "skidoo"} | |
| s := reflect.ValueOf(&t).Elem() | |
| typeOfT := s.Type() | |
| for i := 0; i < s.NumField(); i++ { |
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
| sudo apt-get install avahi-daemon avahi-discover avahi-utils libnss-mdns mdns-scan |
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 QuartzCore | |
| class ViewController: UIViewController { | |
| @IBOutlet weak var label: UILabel | |
| @IBOutlet weak var counter: UILabel | |
| override func viewDidLoad() { | |
| super.viewDidLoad() |
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 | |
| export GO_VERSION=1.16.3 | |
| export GO_DOWNLOAD_URL=https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz | |
| export GOROOT=/opt/go | |
| export GOPATH=$GOROOT/packages | |
| export PATH=$PATH:$GOROOT/bin:$GOPATH/bin | |
| sudo mkdir $GOROOT |
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
| example.com { | |
| root * /var/www/vhosts/example.com/public | |
| php_fastcgi unix//var/run/php/php7.4-fpm.sock | |
| file_server | |
| encode zstd gzip | |
| } |
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 Foundation | |
| import os.log | |
| class URLCacheTest { | |
| let logger = Logger(subsystem: "URLCacheTest", category: "main") | |
| // HTTP HEADERS: | |
| // Date: Wed, 04 Nov 2020 11:13:24 GMT | |
| // Server: Apache | |
| // Strict-Transport-Security: max-age=63072000; includeSubdomains; preload |
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
| /** | |
| * Laravel's Arr::dot function for Javascript. | |
| * IMPORTANT: Requires lodash installed. | |
| */ | |
| function dot(array, prepend) { | |
| results = [] | |
| prepend = prepend || '' | |
| $.each(array, function(key, value) { | |
| if ((_.isObject(value) || _.isArray(value)) && ! _.isEmpty(value)) { |
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
| <?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>UnifiedBar</key> | |
| <dict> | |
| <key>DisclosureRequired</key> | |
| <string>ace440ac-b4f6-4b43-aade-02bba1589aef</string> | |
| <key>Enabled</key> | |
| <false/> |
OlderNewer