Skip to content

Instantly share code, notes, and snippets.

override fun onLoadFinished(loader: Loader<MutableList<Bitmap>>, data: MutableList<Bitmap>?) {
Log.d(Constants.PLATFORM_NAME, "Finishing PrintAsyncTask loader")
loaderManager!!.destroyLoader(LOADER_NUMBER)
val provider = findProvider()
val context: Context = this
var i = 0
val listener: Result = object : Result {
override fun success(listenerResult: Any?) {
val response = listenerResult as HashMap<*, *>
if (response["success"] as Boolean) {
@dcrec1
dcrec1 / read.js
Last active May 9, 2018 13:35 — forked from sjcotto/read.js
function isChatMessage(message) {
if (message.__x_isSentByMe) {
return false;
}
if (message.__x_isNotification) {
return false;
}
if (!message.__x_isUserCreatedType) {
return false;
}
rm -f CHANGELOG.md
conventional-changelog
git add CHANGELOG.md
git commit -m "update changelog"
git push origin HEAD:master
@dcrec1
dcrec1 / deploy.sh
Created September 25, 2015 21:32
Heroku deploy script
rake assets:precompile
if [[ $(git status | grep assets) ]] ; then
echo "Precompile assets!"
else
git push heroku master
heroku run rake db:migrate --app <app>
heroku restart --app <app>
fi
input {
tcp {
port => #port
}
}
output {
elasticsearch {
host => #host
port => #port
@dcrec1
dcrec1 / statsd.init.sh
Last active December 17, 2015 04:28 — forked from erickr/statsd.init.sh
#!/bin/bash
#
# StatsD
#
# chkconfig: 3 50 50
# description: StatsD init.d
. /lib/lsb/init-functions
prog=statsd
STATSDDIR=/var/local/apps/statsd
@dcrec1
dcrec1 / respond-to.sass
Created August 23, 2012 21:17
respond-to mixin
$mediaPhone: 480px !default
$mediaTablet: 768px !default
$mediaDesktop: 980px !default
$mediaLarge: 1200px !default
=respond-to($media)
@if $media == phone
@media only screen and (max-width: $mediaPhone)
@content
@else if $media == tablet
@dcrec1
dcrec1 / unicorn
Created March 7, 2012 15:03
/etc/init.d script for unicorn
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
@dcrec1
dcrec1 / unicorn
Created March 7, 2012 15:02
/etc/init.d script for unicorn
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
@dcrec1
dcrec1 / unicorn
Created March 7, 2012 15:02
/etc/init.d script for unicorn
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##