This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024, Deepankar Bhardwaj | |
# | |
# 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 | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Built application files | |
/*/build/ | |
# Crashlytics configuations | |
com_crashlytics_export_strings.xml | |
# Local configuration file (sdk path, etc) | |
local.properties | |
# Gradle generated files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String md5(String in) { | |
byte[] bytes; | |
StringBuilder hashtext; | |
try { | |
bytes = in.getBytes("UTF-8"); | |
MessageDigest md = MessageDigest.getInstance("MD5"); | |
byte[] digest = md.digest(bytes); | |
BigInteger bigInt = new BigInteger(1, digest); | |
hashtext = new StringBuilder(bigInt.toString(16)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.zg.koch; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.Point; | |
import android.support.annotation.Nullable; | |
import android.util.AttributeSet; | |
import android.view.View; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -z "$1" ] | |
then | |
echo "Please specify JDK path" | |
exit 1 | |
fi | |
JDK_PATH="$1" | |
JDK_APPS=( $() ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -z "$1" ] | |
then | |
echo "Please specify JDK path" | |
exit 1 | |
fi | |
if [ -z "$2" ] | |
then | |
PRIORITY=100 | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
############################################################## | |
# Lempel-Ziv-Stac decompression | |
# BitReader and RingList classes | |
# | |
# Copyright (C) 2011 Filippo Valsorda - FiloSottile | |
# filosottile.wiki gmail.com - www.pytux.it | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#PS1 | |
#export PS1="\[\e[01;32m\]\A\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;34m\]\w\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;34m\]\\$\[\e[0m\]\[\e[00;37m\] \[\e[0m\]" | |
export PS1="\[\e[00;34m\]\w\[\e[0m\]\[\e[00;37m\]\n\[\e[0m\]\[\e[01;32m\]\A\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;34m\]\\$\[\e[0m\]\[\e[00;37m\] \[\e[0m\]" | |
# gitprompt configuration | |
# Set config variables first | |
GIT_PROMPT_ONLY_IN_REPO=1 | |
# as last entry source the gitprompt script | |
source /home/"$(whoami)"/.bash-git-prompt/gitprompt.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
set hlsearch | |
set tabstop=4 | |
set ai | |
set nu | |
" Disable Arrow keys in Escape mode | |
map <up> <nop> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void loop(Deque<Runnable> rs, int delay) { | |
final Runnable first = rs.removeFirst(); | |
new Handler().post(first); | |
rs.addLast(first); | |
new Handler().postDelayed(() -> loop(rs, delay), delay); | |
} |
NewerOlder