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
extension GitKit { | |
public class func getMyOrganisations() -> Observable<[Organisation]> { | |
guard let organisationsURL = GitKit.currentUser.value?.organizationsUrl else { return [] } | |
return Alamofire.request(.GET, (organisationsURL)) | |
.rx_responseJSON() | |
.map { response, json in | |
guard let array = json as? [[String:AnyObject]] else { return [] } |
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
import tkinter as tk | |
tk.Tk() | |
print("This should show a new TK window") |
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 | |
touch chapter{1..5}.txt; | |
for file in chapter{1..5}.txt | |
do | |
echo "This is some text is $file" >> $file | |
done | |
echo "Filled chapters" |
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 | |
echo "Where woudl you like to search from?" | |
read startDir | |
i=0 | |
n=0 | |
for file in ls -adR -1 *.sh $startDir | |
do | |
firstLine=$(head -n 1 $file) |
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 | |
rm -r sortedPalindromes.txt | |
rm -r sortedNotPalindromes.txt | |
cat palindromes.txt | while read line | |
do | |
if [[ $(rev <<< $line) == "$line" ]]; then | |
echo $line >> sortedPalindromes.txt | |
else |
NewerOlder