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/sh | |
node -e "console.log(require('crypto').randomBytes(256).toString('base64')); |
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 UISplitViewController { | |
open override func viewDidLoad() { | |
super.viewDidLoad() | |
self.show(.primary) | |
} | |
} |
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
if UIDevice.current.userInterfaceIdiom == .pad { | |
// iPad | |
} | |
else { | |
// iPhone | |
} |
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
// View port widths from Bootstrap | |
export const xs = 0; | |
export const sm = 576; | |
export const md = 768; | |
export const lg = 992; | |
export const xl = 1200; | |
export const vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0); | |
export const isSmDown = (): boolean => vw <= sm; | |
export const isMdDown = (): boolean => vw <= md; |
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 | |
expand_func () { | |
OLD_LENGTH=4 # old indentation length | |
NEW_LENGTH=2 # new indentation length | |
unexpand -t $OLD_LENGTH "$1" | expand -t $NEW_LENGTH > "$1.tmp" | |
mv "$1.tmp" "$1" | |
} | |
export -f expand_func |
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 | |
function updateWordPress { | |
cd $1 | |
wp core update | |
wait | |
wp plugin update --all | |
wait | |
wp theme update --all | |
wait |
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
// | |
// ImageResizer.swift | |
// | |
// Created by Alex Seifert on 18/06/2016. | |
// http://www.alexseifert.com | |
// | |
import Foundation | |
import Cocoa |
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
@-moz-document url-prefix() { | |
.css-class { | |
} | |
} |