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
/* Playground - noun: a place where people can play */ | |
/* This test does nothing in the playground. Not sure why it does not work, but | |
* I'm not that surprised it doesn't. */ | |
import Foundation | |
class Channel<T> { |
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
/* From https://www.famkruithof.net/guid-uuid-make.html | |
* and https://www.famkruithof.net/guid-uuid-timebased.html */ | |
extension UUID { | |
var isTimeUUID: Bool { | |
return (uuid.8 & 0xC0) == 0x80 /* Variant is the one we expect */ && (uuid.6 & 0xF0) == 0x10 /* Time-based version of the variant */ | |
} | |
var generationDate: Date? { |
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
# First argument is the name of the variable in which you want the answer to be. | |
# Next arguments will compose the message to show to the user before starting | |
# the reading. An additional space will be added at the end of the message. | |
print_message_read_response() { | |
var_name="$1" | |
eval $var_name= | |
shift | |
read -p "$* " $var_name | |
} |
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 | |
# Init file for login shells | |
# Most of the instructions here should be in the .bashrc file... | |
function show_branch1() { | |
git branch >/dev/null 2>&1 | |
if [ $? -eq 0 ]; then printf "["; fi | |
} | |
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 [ -z "$1" -o "$1" -lt 0 -o "$1" -gt 100 ]; then | |
echo "Usage: $0 new_volume" >/dev/stderr | |
echo " new_volume must be between 0 and 100" >/dev/stderr | |
exit 1 | |
fi | |
new_volume="$(echo "($1 * 8) / 100" | bc)" | |
osascript -e "tell application \"System Events\" to set volume $new_volume"; # Max is 8, min is 0 |
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
/* Note: There are a lot of assumption on the type of Keychain element that are | |
* inserted, etc. You should adjust the code accordingly to your needs. */ | |
/* Note2: Indent spacing is **3** tabs, but gist does not propose the option… */ | |
import Foundation | |
import Security | |
struct Keychain { |
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
class HighlightColorTextFieldCell : NSTextFieldCell { | |
var hightlightColor: NSColor? { | |
didSet { | |
updateTextColor() | |
} | |
} | |
var nonHighlightedTextColor: NSColor? { | |
didSet { |
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
FAIL: Swift(linux-x86_64) :: Index/Store/output-failure.swift (10471 of 11161) | |
******************** TEST 'Swift(linux-x86_64) :: Index/Store/output-failure.swift' FAILED ******************** | |
Script: | |
-- | |
rm -rf "/root/swift-source/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Index/Store/Output/output-failure.swift.tmp" && mkdir -p "/root/swift-source/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Index/Store/Output/output-failure.swift.tmp" | |
mkdir /root/swift-source/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Index/Store/Output/output-failure.swift.tmp/idx | |
/root/swift-source/build/buildbot_linux/swift-linux-x86_64/bin/swift -frontend -target x86_64-unknown-linux-gnu -module-cache-path '/root/swift-source/build/buildbot_linux/swift-linux-x86_64/./swift-test-results/x86_64-unknown-linux-gnu/clang-module-cache' -swift-version 3 /root/swift-source/swift/test/Index/Store/output-failure.swift -typecheck | |
chmod -w /root/swift-source/build/buildbot_linux/swift-linux-x86_64/test-lin |
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
Please note that these warnings are just used to help the Homebrew maintainers | |
with debugging if you file an issue. If everything you use Homebrew for is | |
working fine: please don't worry or file an issue; just ignore this. Thanks! | |
Warning: The filesystem on / appears to be case-sensitive. | |
The default macOS filesystem is case-insensitive. Please report any apparent problems. | |
Warning: Your Homebrew's prefix is not /usr/local. | |
Some of Homebrew's bottles (binary packages) can only be used with the default | |
prefix (/usr/local). |
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
HOMEBREW_VERSION: 2.0.1-23-g1fd8b38 | |
ORIGIN: https://github.com/Homebrew/brew | |
HEAD: 1fd8b387c65ca54ae37944ca82e8675360c69c2c | |
Last commit: 9 hours ago | |
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core | |
Core tap HEAD: e3d13566d206d767d6e09d6aad7c6484be553e71 | |
Core tap last commit: 3 hours ago | |
HOMEBREW_PREFIX: /Users/frizlab/usr/homebrew | |
HOMEBREW_REPOSITORY: /Users/frizlab/usr/homebrew | |
HOMEBREW_CELLAR: /Users/frizlab/usr/homebrew/Cellar |
OlderNewer