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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
function my_woocommerce_loaded_function() { | |
global $woocommerce; | |
// remove WC generator tag from <head> | |
remove_action( 'wp_head', array( $woocommerce, 'generator' ) ); | |
} | |
// called only after woocommerce has finished loading | |
add_action( 'woocommerce_init', 'my_woocommerce_loaded_function' ); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
func getTheLastGuestKey(completionHandler: (Bool)-> ()) { | |
self.guestRef.queryOrderedByKey().queryLimitedToLast(1).observeSingleEventOfType(.Value, withBlock: {(snapshot) in | |
for guest in snapshot.children { | |
let guestSnapshot = snapshot.childSnapshotForPath(guest.key) | |
var lastGuestCheckintime: String! = "" | |
if let result_checkin = guestSnapshot.value?["checkintime"] as? NSNumber { | |
lastGuestCheckintime = "\(result_checkin)" | |
} |
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
@IBAction func takePhoto(sender: UIButton) { | |
let imagePicker: UIImagePickerController! = UIImagePickerController() | |
imagePicker.delegate = self | |
if (UIImagePickerController.isSourceTypeAvailable(.Camera)) { | |
if UIImagePickerController.availableCaptureModesForCameraDevice(.Front) != nil { | |
imagePicker.allowsEditing = false | |
imagePicker.sourceType = .Camera | |
imagePicker.cameraCaptureMode = .Photo |
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
[alias] | |
d = diff | |
br = branch --all | |
ci = commit | |
co = checkout | |
dh = diff HEAD | |
lg = log --graph --pretty=format:'%Cred%h..%Creset - %s %Cgreen(%cr)%Creset - %an' --abbrev-commit --date=relative | |
lgn = log --pretty=oneline --abbrev-commit --show-notes=* | |
mnff = merge --no-ff | |
rh = reset --soft HEAD^ |
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
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
OlderNewer