Tutorial by Examples: git

ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements"); ListItemCollectionPosition itemPosition = null; while (true) { CamlQuery camlQuery = new CamlQuery(); camlQuery.ListItemCollectionPosition = it...
Assume you've initialized a project with the following directory structure: /build app.js Then you add everything so you've created so far and commit: git init git add . git commit -m "Initial commit" Git will only track the file app.js. Assume you added a build step to your applicat...
3.0 let string = "My fantastic string" var index = string.startIndex while index != string.endIndex { print(string[index]) index = index.successor() } Note: endIndex is after the end of the string (i.e. string[string.endIndex] is an error, but string[string.startIndex] i...
A reference to an option &Option<T> cannot be unwrapped if the type T is not copyable. The solution is to change the option to &Option<&T> using as_ref(). Rust forbids transferring of ownership of objects while the objects are borrowed. When the Option itself is borrowed (&a...
It is considered good practice to use a prefix when creating git archives, so that extraction will place all files inside a directory. To create an archive of HEAD with a directory prefix: git archive --output=archive-HEAD.zip --prefix=src-directory-name HEAD When extracted all the files will be...
It is also possible to create archives of other items than HEAD, such as branches, commits, tags, and directories. To create an archive of a local branch dev: git archive --output=archive-dev.zip --prefix=src-directory-name dev To create an archive of a remote branch origin/dev: git archive --...
With git archive it is possible to create compressed archives of a repository, for example for distributing releases. Create a tar archive of current HEAD revision: git archive --format tar HEAD | cat > archive-HEAD.tar Create a tar archive of current HEAD revision with gzip compression: gi...
As discussed in the introduction, the gradle wrapper functionality works because a jar is downloaded into the project to be used when the gradlew command is run. However this may not get committed and after the next time the project is checked out, gradlew will fail to run with the error: Error: C...
Download the Atlassian conversion utility here. This utility requires Java, so please ensure that you have the Java Runtime Environment JRE installed on the machine you plan to do the conversion. Use the command java -jar svn-migration-scripts.jar verify to check if your machine is missing any of t...
You can pass latitude, longitude from your app to Google map using Intent String uri = String.format(Locale.ENGLISH, "http://maps.google.com/maps?q=loc:%f,%f", 28.43242324,77.8977673); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); startActivity(intent);
Above I noticed an example to remove items from a List within a Loop and I thought of another example that may come in handy this time using the Iterator interface. This is a demonstration of a trick that might come in handy when dealing with duplicate items in lists that you want to get rid of. N...
You can install a gem from github or filesystem. If the gem has been checked out from git or somehow already on the file system, you could install it using gem install --local path_to_gem/filename.gem Installing gem from github. Download the sources from github mkdir newgem cd newgem git clon...
[ alias ] ignored = ! git ls-files --others --ignored --exclude-standard --directory \ && git ls-files --others -i --exclude-standard Shows one line per file, so you can grep (only directories): $ git ignored | grep '/$' .yardoc/ doc/ Or count: ~$ git ignored | ...
Sometimes you may want maintain versions of a git repository on machines that have no network connection. Bundles allow you to package git objects and references in a repository on one machine and import those into a repository on another. git tag 2016_07_24 git bundle create changes_between_tags...
GitHub offers unlimited hosting for users or organizations and project site. Both Jekyll and static files are available. Here are the steps in hosting your Jekyll blog on Github. Setup Users or organizations site Create a repository named username.github.io, where username is your username (or...
Open Repo Create new repo (My advice first add pods on a temporary repo before adding to your original project) Fill Repository name with your repo name. I'll use "myrepo" for this tutorial and will use "<" and ">" symbols for the parts you should change to yo...
Popular within many open source projects but not only. Master branch of a specific location (Github, Gitlab, Bitbucket, local server) contains the latest shippable version. For each new feature/bug fix/architectural change each developer creates a branch. Changes happen on that branch and can be d...
If you are inside a folder of a git repository it might be nice to show the current branch you are on. In ~/.bashrc or /etc/bashrc add the following (git is required for this to work): function prompt_command { # Check if we are inside a git repository if git status > /dev/null 2>&a...
SubGit may be used to perform a one-time import of an SVN repository to git. $ subgit import --non-interactive --svn-url http://svn.my.co/repos/myproject myproject.git
GitHub expands Markdown syntax to provide new useful features. Header # Header1 ## Header2 ### Header3 #### Header4 ##### Header5 ###### Header6 H1 === H2 --- Emphasis *Italic1* _Italic2_ **Bold1** __Bold2__ ***Bold_Italic*** ~~Strikethrough~~ Horizontal Line --- *** ___ ...

Page 3 of 8