Skip to content

Instantly share code, notes, and snippets.

View dineshvg's full-sized avatar
🎧
Its over 9000

Dinesh Gangatharan dineshvg

🎧
Its over 9000
View GitHub Profile
@dineshvg
dineshvg / Uselful Git commands
Created December 26, 2016 17:32
Git commands that can come in handy during developement
Get all remote branches
git fetch --all
git checkout -b <ur_new_local_branch_name> remotes/origin/<Remote_Branch_Name>
Check which local branch of yours track which remote branch in Git
git branch -vv
@jaredrummler
jaredrummler / XposedUtils.java
Created October 31, 2016 22:34
Utility methods for checking if the Xposed framework is installed.
/*
* Copyright (C) 2016 Jared Rummler <jared.rummler@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@tasomaniac
tasomaniac / screenrecord.sh
Last active June 28, 2022 22:05 — forked from PaulKinlan/getdeviceart.sh
Screen Record for Android
#!/bin/sh
set -e
if [ -z "$1" ]; then
shot_path=$(date +%Y-%m-%d-%H-%M-%S).mp4
else
shot_path="$*"
fi
@skratchdot
skratchdot / convert.sh
Created March 23, 2016 14:18
Convert Image (.png) to .svg
#
# http://stackoverflow.com/a/29515560
# use .pbm instead of .ppm for black/white only
#
sudo apt-get install potrace imagemagick
convert -flatten input.png output.ppm
potrace -s output.ppm -o output.svg
rm output.ppm
@drmalex07
drmalex07 / gnuplot-py-example.py
Created December 24, 2014 17:06
A simple example for Gnuplot.py. #python #gnuplot
import numpy
import Gnuplot
def rainfall_intensity_t10(t):
return 11.23 * (t**(-0.713))
def rainfall_intensity_t50(t):
return 18.06 * (t**(-0.713))
g = Gnuplot.Gnuplot()
@mychaelstyle
mychaelstyle / build.gradle
Created March 28, 2014 06:04
Example Gradle build Java with FindBugs and PMD and CPD
apply plugin: "java"
apply plugin: "eclipse"
apply plugin: "maven"
apply plugin: "findbugs"
apply plugin: "pmd"
def defaultEncoding = 'UTF-8'
[compileJava, compileTestJava]*.options*.encoding = defaultEncoding
sourceCompatibility = 1.7
@erickok
erickok / SelfSignedCrtCertificate.java
Last active May 11, 2023 14:25
Loading a self-signed SSL certificate .crt file and packaging it into a SSLSocketFactory for use with a HttpsURLConnection.
// Usage example...
HttpsURLConnection connection = (HttpsURLConnection) new URL("https://someurl.com").openConnection();
connection.setSSLSocketFactory(buildSslSocketFactory());
private static SSLSocketFactory buildSslSocketFactory(Context context) {
// Add support for self-signed (local) SSL certificates
// Based on http://developer.android.com/training/articles/security-ssl.html#UnknownCa
try {