Skip to content

Instantly share code, notes, and snippets.

View OrenBochman's full-sized avatar
๐Ÿ 
Working from home

Oren Bochman OrenBochman

๐Ÿ 
Working from home
  • WMF
  • 08:37 (UTC +03:00)
View GitHub Profile
@sddamico
sddamico / gistp.sh
Last active November 1, 2018 10:54
paste your clipboard to a gist and copy the gist url to the clipboard
gistp() {
if [ -z "$1" ] ; then
echo "Must supply filename for new gist"
exit(1)
else
gisturl=$(pbpaste | gist -f $1)
echo "Copying $gisturl to clipboard"
echo "$gisturl" | pbcopy
fi
}
@dors
dors / LogUtil.java
Last active March 9, 2017 20:46
Cool log util for Android apps that prints each log with the thread, class name and method name from which the log was made
import android.util.Log;
import java.text.MessageFormat;
/*
* Copyright 2015 Dor Sakal
*
* 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
//Add before making a phone call
if (ActivityCompat.checkSelfPermission(
MainActivity.this, Manifest.permission.CALL_PHONE)
!= PackageManager.PERMISSION_GRANTED) {
if (ActivityCompat.shouldShowRequestPermissionRationale(MainActivity.this,
Manifest.permission.CALL_PHONE)) {
Toast.makeText(MainActivity.this, "I know you said no, but I'm asking again", Toast.LENGTH_SHORT).show();
}
ActivityCompat.requestPermissions(MainActivity.this,
new String[]{Manifest.permission.CALL_PHONE},
@HugoMatilla
HugoMatilla / ADBCheatSheet.md
Last active February 25, 2025 21:38
ADB Cheat Sheet

CONFIG

Include adb and other android tools on your path

In Users/hugomatilla.bash_profile add export PATH=$PATH:/Users/hugomatilla/Documents/AndroidSDKs/sdk/platform-tools export PATH=$PATH:/Users/hugomatilla/Documents/AndroidSDKs/sdk/tools

My own adb location

cd /Users/hugomatilla/Documents/AndroidSDKs/sdk/platform-tools
#Enable daemon
org.gradle.daemon=true
# Try and findout the best heap size for your project build.
org.gradle.jvmargs=-Xmx3096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# Modularise your project and enable parallel build
org.gradle.parallel=true
# Enable configure on demand.
@ricardojlrufino
ricardojlrufino / Shell.java
Last active April 6, 2022 23:50
Run shell comands from APP as SUDO (like start ADB)
package br.com.criativasoft.eduaccess.util;
import android.util.Log;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
@gillescastel
gillescastel / Ultisnip snippets
Last active March 19, 2025 13:01
Vimtex setup
snippet template "Basic template" b
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[dutch]{babel}
\usepackage{amsmath, amssymb}
\begin{document}
@santisbon
santisbon / Search my gists.md
Last active May 5, 2025 21:07
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@yuvadm
yuvadm / users.csv
Created January 30, 2019 07:13
Israeli Girls Network
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 10 columns, instead of 6 in line 6.
ID,Handle,Name,Description,Date Created,Location,Followers,Friends,Favourites,Statuses
1077155927084748800,tamershimon,Tamar shimon,"โ€ื‘ื›ืœ ื“ื‘ืจ ื™ืฉ ื™ื•ืคื™๐Ÿ˜, ืื‘ืœ ืœื ื›ืœ ืื—ื“ ื™ื›ื•ืœ ืœืจืื•ืช ื–ืืช ๐Ÿค—",2018-12-24 10:56:00,Israel,33,168,57,76
1077156685918158853,anatvladimir2,Anat vladimir,"โ€ื”ืคืกื™ืžื™ ืžืชืœื•ื ืŸ ืขืœ ื”ืจื•ื—, ื”ืื•ืคื˜ื™ืžื™ ืžืฆืคื” ืฉื”ื™ื ืชืฉืชื ื”, ื”ื—ื›ื ืžื›ื•ื•ืŸ ืืช ื”ืžืคืจืฉ ื‘ื”ืชืื ๐Ÿ˜Ž๐Ÿ‘Œ",2018-12-24 10:59:01,Israel,13,102,8,68
1077157300140429313,livnatavner3,livnat Avner,โ€ื—ื™ื ื•ืš ื”ื•ื ื”ื ืฉืง ื”ื—ื–ืง ื‘ื™ื•ืชืจ ืฉื ื™ืชืŸ ืœื”ืฉืชืžืฉ ื‘ื• ื›ื“ื™ ืœืฉื ื•ืช ืืช ื”ืขื•ืœื๐Ÿ˜‚ ื ื›ื•ืŸ,2018-12-24 11:01:27,ื™ืฉืจืืœ,15,64,42,74
1077196238867623937,sarahmoti2,Sarah Moti,"โ€ื—ื™ื” ื›ืื™ืœื• ื–ื” ื™ื•ืžืš ื”ืื—ืจื•ืŸ, ืœืžื“ ื›ืื™ืœื• ืชื—ื™ื” ืœื ืฆื—๐Ÿ˜‰๐Ÿ™‡",2018-12-24 13:36:11,Israel,64,68,17,78
1077196845888225280,gilacohen4,Gila Cohen,You know youโ€™re in love when you canโ€™t fall asleep because reality is finally better than your dreams.โคโค๐Ÿ‘,2018-12-24 13:38:36,,12,98,16,71
1077199688019988486,emiliegalil,Emilie Galil,"If I had a flower for every time I thought of you, I could walk in my garden forever ๐ŸŒฒโš˜๐ŸŒท๐ŸŒธ๐Ÿ’๐ŸŒผ๐ŸŒป๐ŸŒบ๐ŸŒน",2018-12-24 13:49:53,Israe