(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.
(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.
# alias to edit commit messages without using rebase interactive | |
# example: git reword commithash message | |
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f" | |
# edit all commit messages | |
git rebase -i --root | |
# clone all your repos with gh cli tool | |
gh repo list --json name -q '.[].name' | xargs -n1 gh repo clone |
using System; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
namespace OpinionatedCode.Collections | |
{ | |
public sealed class RedBlackTree<TKey, TValue> | |
{ | |
private readonly RedBlackTreeNode<TKey, TValue> _leaf = RedBlackTreeNode<TKey, TValue>.CreateLeaf(); |
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
#delete all the remote tags with the pattern your looking for, ie. DEV- | |
git tag | grep <pattern> | xargs -n 1 -i% git push origin :refs/tags/% | |
#delete all your local tags | |
git tag | xargs -n 1 -i% git tag -d % | |
#fetch the remote tags which still remain | |
git fetch |
Setting up p4merge
as diff and merge tool on Windows. Tried for Git version 1.8.4.msysgit.0
.
Two alternatives are explained: using the command line, and directly editing the config file.
Being the installation path "C:Program Files\Perforce\p4merge.exe"
, just run:
$ git config --global diff.tool p4merge
How to import and indicate empty request or reply messages:
import "google/protobuf/empty.proto";
service SomeService {
rpc SomeOperation (google.protobuf.Empty) returns (google.protobuf.Empty) {}
}
using System; | |
using System.Collections.Generic; | |
public class Heap<T> | |
{ | |
List<T> a = new List<T>(); | |
Comparer<T> comparer; | |
public Heap(Comparer<T> comparer) | |
{ |
https://wiki.archlinux.org/index.php/Dell_XPS_15_(9550)
A simple dual-boot UEFI installation for Arch Linux without any file system encryption.
Assumes that Windows has already been installed beforehand.
Follows the official installation guide: https://wiki.archlinux.org/index.php/installation_guide
// This is the Gist for a post I wrote about publishing snapshots with Gradle's maven-publish plugin: | |
// http://blog.codefx.org/tools/snapshots-gradle-maven-publish-plugin | |
// PROJECT_NAME is defined in settings.gradle | |
group 'PROJECT_GROUP' | |
version 'PROJECT_VERSION' | |
apply plugin: 'java' | |
apply plugin: 'maven-publish' |