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
FILES="./*.md" | |
for f in $FILES | |
do | |
#echo "Processing $f file to '${f/\.md/.mediawiki}'" | |
pandoc -f markdown_mmd "$f" -t mediawiki -o "${f/\.md/.mediawiki}" | |
done |
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
"* Page "+document.querySelector(".item.active").innerText+"\n"+(Array.from(document.querySelectorAll(".sidebar-item")).map( item => " - " + item.querySelector(".item-name").innerText + "\n - <img src='" + item.querySelector(".item-icon img").src + "'>").join("\n")) |
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 CGPoint { | |
func midBetween(_ other: CGPoint) -> CGPoint { | |
return CGPoint(x: (self.x + other.x) / 2.0, | |
y: (self.y + other.y) / 2.0) | |
} | |
func perpedicularTo(_ other: CGPoint, distance: CGFloat) -> (CGPoint, CGPoint) { | |
// Vector from p to p1; | |
var diff = CGPoint(x: other.x - self.x, y: other.y - self.y); |
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
jobs: | |
jazzy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get the version | |
id: commit_name | |
run: echo ::set-output name=NAME::${GITHUB_REF#refs/*/} | |
- name: Echo commit name | |
run: echo ref is ${{ steps.commit_name.outputs.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
extension UserDefaults { | |
static func syncSettingsBundle() { | |
if let bundlePath = Bundle.main.path(forResource: "Settings", ofType: "bundle"), | |
let plistPath = URL(string: bundlePath)?.appendingPathComponent("Root.plist").absoluteString { | |
let defaultDefaults = UserDefaults.defaultsForPlist(path: plistPath, defaults: [:]) | |
UserDefaults.standard.register(defaults: defaultDefaults) | |
} | |
} |
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
diff -uwB <(git show origin/branch:path/to/en.lproj/Localizable.strings | sort | sed -n 's/"\(.*\)" =.*/\1/p') <(git show develop:path/to/en.lproj/Localizable.strings | sort | sed -n 's/"\(.*\)" =.*/\1/p') |
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
("Epic Link" in ("SMLS-676") OR parentEpic in ("SMLS-676")) AND status in (Backlog, "In Progress", "Selected for Development") |
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
/** | |
// Example: | |
// dictionary will be a dictionary with keys for every unique value of object.propertyToGroupBy | |
// the value of each being an array of objects | |
var dictionary = arrayOfObjects.group { $0.propertyToGroupBy } | |
// dictionary will be a dictionary with 2 keys 'Important' and 'Other' each containing an array of ItemType objects | |
var dictionary = arrayOfObjects.group { (item:ItemType) -> String in | |
if item.differentPropertyToGroupBy == "some value" { | |
return "Important" |
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
NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; | |
NSArray *fontNames; | |
NSInteger indFamily, indFont; | |
for (indFamily=0; indFamily<[familyNames count]; ++indFamily) | |
{ | |
NSLog(@"Family name: %@", [familyNames objectAtIndex:indFamily]); | |
fontNames = [[NSArray alloc] initWithArray: | |
[UIFont fontNamesForFamilyName: |