git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
string regex = @"\A(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)\Z"; | |
bool isEmail = Regex.IsMatch(emailString, regex, RegexOptions.IgnoreCase); |
// expected usage: var tableRec = Utils.CopyProperties<StatDbRecord>(fileRow, typeof(IStat)); | |
static public class Utils | |
{ | |
static public TDst CopyProperties<TDst>(object src, Type hasProps) where TDst : class, new() | |
{ | |
var dst = new TDst(); | |
foreach (var propInf in hasProps.GetProperties()) | |
{ | |
var val = propInf.GetValue(src, null); |
using System; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.Runtime.InteropServices; | |
using System.Windows.Forms; | |
public class ControlSnapshot | |
{ | |
public static Bitmap Snapshot(Control c) | |
{ |
##recursive add all
git add --all
##commit
git commit -m "this is the commit message"
##squash
git reset --soft HEAD~2 && git commit
where 2 is the number of commits to squash
This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
Convert .mov/.MP4 to .gif
As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.
This is not limited to developer, anyone has this need can use this method to convert the files.
name: $(BuildDefinitionName).$(DayOfYear)$(Rev:.r).$(Build.RequestedFor) | |
trigger: | |
branches: | |
include: | |
- master | |
pr: none # don't trigger on pr, only when merging to master | |
pool: |
Or open the terminal and try this script:
flutter clean