Skip to content

Instantly share code, notes, and snippets.

View neuged's full-sized avatar

David Neugebauer neuged

View GitHub Profile
@yuntan
yuntan / FloatSeekBarPreference.kt
Last active August 22, 2024 21:17
SeekBarPreference for Float with value formatter
package com.example.app
import android.content.Context
import android.content.res.TypedArray
import android.util.AttributeSet
import android.widget.SeekBar
import android.widget.TextView
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
@dogancelik
dogancelik / close_everything.py
Last active November 5, 2020 01:55
Close project then exit in #Sublime_Text
import sublime, sublime_plugin
class close_everything(sublime_plugin.WindowCommand):
def run(self):
self.window.run_command('close_workspace')
self.window.run_command('exit')
@caseyyee
caseyyee / gist:116c44c100a9ac7844037cfd83dd9bae
Created April 13, 2017 20:23
three.js Gradient texture
//three.js r.62
var mesh, renderer, scene, camera, controls;
var t = 0, ambientFactor, canvas, textureImage;
init();
animate();
function init() {
@sj26
sj26 / LICENSE.md
Last active November 6, 2024 21:56
Bash retry function

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit

@dedunumax
dedunumax / .gitignore Java
Last active October 24, 2024 04:44
A complete .gitignore file for Java.
##############################
## Java
##############################
.mtj.tmp/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*
@perrygeo
perrygeo / django_model_graph.sh
Created April 13, 2013 21:44
Generate UML diagram of django app models
apt-get install python-pygraphviz
pip install django-extensions
# add 'django_extensions' to INSTALLED_APPS in settings.py
python manage.py graph_models trees -o test.png
@xeoncross
xeoncross / gitstats.sh
Created November 5, 2012 21:35
Git - calculate how many lines of code were added/changed by someone
# Run this in the project repo from the command-line
# http://stackoverflow.com/a/4593065/99923
git log --shortstat --author "Xeoncross" --since "2 weeks ago" --until "1 week ago" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}'