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;
}
@dcrec1
dcrec1 / centos
Last active March 24, 2017 11:52
ubuntu/centos nginx
cd /tmp
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm -Uhv rpmforge-release*.rf.i386.rpm
yum install readline-dev htop
@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
rm -f CHANGELOG.md
conventional-changelog
git add CHANGELOG.md
git commit -m "update changelog"
git push origin HEAD:master
@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
##
@dcrec1
dcrec1 / Gemfile
Created October 19, 2011 21:12 — forked from chriseppstein/readme.md
How to integrate Compass with Rails 3.1 asset pipeline
group :assets do
gem 'sass-rails', '~> 3.1.0'
gem 'coffee-rails', '~> 3.1.0'
gem 'uglifier'
gem 'compass', '~> 0.12.alpha'
# include other compass plugins here. E.g.:
gem 'compass-susy-plugin', :require => 'susy'
end