Skip to content

Instantly share code, notes, and snippets.

View n0mer's full-sized avatar
:bowtie:
working

Nik Handyman n0mer

:bowtie:
working
View GitHub Profile
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip
# Unzip
unzip protoc-3.3.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
@ianlintner-wf
ianlintner-wf / cordova-google-services-version-gradle-fix.js
Last active February 19, 2019 10:10
This is to fix version issues between multiple google services plugins in Ionic & cordova builds. Cordova before_prepare hook.
#!/usr/bin/env node
// Define hook in your config <hook src="scripts/cordova-google-services-version-gradle-fix.js" type="before_prepare" />
var sourceDir = '';
var platformDir = 'platforms/android';
var fs = require('fs');
var path = require('path');
var readline = require("readline");
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 3, 2024 15:55
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@chranderson
chranderson / nvmCommands.js
Last active May 3, 2024 07:06
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@jkuipers
jkuipers / LoggingClientHttpRequestInterceptor.java
Last active November 27, 2023 18:44
RestTemplate-interceptor that logs outgoing requests and resulting responses
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpRequest;
import org.springframework.http.MediaType;
import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.util.StreamUtils;
package com.firebase.utils;
public class FireBasePushIdGenerator {
static final String PUSH_CHARS = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz";
static long LAST_PUSH_TIME = 0;
static int[] LAST_RANDOM_CHAR_IDXS= new int[12];
static char[] ID = new char[20];
public static String getFirebaseId() {
long now = System.currentTimeMillis();
@bblanchon
bblanchon / GitExecutableFlag.sh
Last active August 8, 2023 13:53
Git: add executable flag to *.sh
find . -name '*.sh' | xargs git update-index --chmod=+x
@kolorobot
kolorobot / build.gradle
Created September 3, 2015 22:05
Spring Boot with overridden Spring Version (without dependency management)
buildscript {
ext {
springBootVersion = '1.2.5.RELEASE'
springVersion = '4.2.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
@kohsuke
kohsuke / git-children-of
Created November 21, 2013 21:44
Given a commit, find immediate children of that commit.
#!/bin/bash -e
# given a commit, find immediate children of that commit.
for arg in "$@"; do
for commit in $(git rev-parse $arg^0); do
for child in $(git log --format='%H %P' --all | grep -F " $commit" | cut -f1 -d' '); do
git describe $child
done
done
done
@larrybotha
larrybotha / readme.markdown
Last active October 27, 2021 04:28
Postfix Using Gmail SMTP in Mac OSX Mavericks