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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
def load_gist(gist_id): | |
"""translate Gist ID to URL""" | |
from json import load | |
from urllib import urlopen | |
gist_api = urlopen("https://api.github.com/gists/" + gist_id) |
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 gitclean="git branch --merged | grep -v \* | xargs git branch -D && git remote update origin --prune" |
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
/// | |
/// OTPService | |
/// cloud_firestore: ^0.12.9 | |
/// firebase_storage: ^3.0.6 | |
/// firebase_auth: ^0.14.0 | |
/// | |
import 'package:firebase_auth/firebase_auth.dart'; | |
typedef void PhoneSubmitCallBack(String status); |
A version number has three components, major.minor.patch e.g. 1.2.13. You decide which to increment based on the changes you have made since the last version.
major.minor.patch
-
Patch is for minor changes or bug fixes
-
Minor is for new functionality
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Localize.py - Incremental localization on XCode projects | |
# João Moreno 2009 | |
# http://joaomoreno.com/ | |
# Modified by Steve Streeting 2010 http://www.stevestreeting.com | |
# Changes | |
# - Use .strings files encoded as UTF-8 |
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 _ip(r *http.Request) string { | |
//Get IP from the X-REAL-IP header | |
ip := r.Header.Get("X-REAL-IP") | |
netIP := net.ParseIP(ip) | |
if netIP != nil { | |
return ip | |
} | |
//Get IP from X-FORWARDED-FOR header | |
ips := r.Header.Get("X-FORWARDED-FOR") |
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
package main | |
import ( | |
"bytes" | |
"strconv" | |
"net" | |
) | |
func main() { | |
print(macAdrr()) |