Skip to content

Instantly share code, notes, and snippets.

Landan lmj0011

Block or report user

Report or block lmj0011

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fnk0 /
Created Oct 16, 2016
Helper class to extract the necessary palette colors from the generate palette
public class PaletteUtils {
public static PaletteColors getPaletteColors(Palette palette) {
PaletteColors colors = new PaletteColors();
//figuring out toolbar palette color in order of preference
if (palette.getDarkVibrantSwatch() != null) {
moonmilk /
Last active May 8, 2018
trying to figure out useful info for running python on dreamhost shared hosting - intended for twitter bot makers

python for botmakers, on dreamhost shared hosting

On a shared hosting service like dreamhost, how do you get your twitter bot up and running? Problems:

  • where should I put my script?
  • you can't install python modules like tweepy (for twitter access) because you don't have root permission
  • once you get that solved, how do you run your script? cron?

I'm still figuring this stuff out myself, so nothing is clear as it should be. Hope this page will be a resource that will improve over time.

crookedneighbor / github_without_symbols.js
Created Sep 25, 2015
Remove Minus and Plus Signs from Github PR Files Tab
View github_without_symbols.js
// Open up a chrome console while viewing the files of a Github PR and paste this:
var deleted_nodes = document.querySelectorAll(".blob-code.blob-code-deletion .blob-code-inner");
var added_nodes = document.querySelectorAll(".blob-code.blob-code-addition .blob-code-inner");
var neutral_nodes = document.querySelectorAll(".blob-code.blob-code-context .blob-code-inner");
var removeNodes = function(nodes) {
for(var i=0; i < nodes.length; i++) {
Malezha / Centrifuge.php
Created Aug 25, 2015
Verifying access to channel
View Centrifuge.php
namespace App\Http\Controllers\Admin\API;
use App\Http\Controllers\Controller;
use App\Models\Channel;
use Illuminate\Http\Request;
class Centrifuge extends Controller
chrisjlee / my.cnf
Created Jun 22, 2012
my.cnf file optimized for InnoDB 64bit setups
View my.cnf
# forked from
#password = [your_password]
port = 3306
socket = /tmp/mysqld.sock
# *** Application-specific options follow here ***
mystix / border-glow.css
Last active Mar 17, 2019
CSS Glow Effect
View border-glow.css
a:hover {
/* border glow effect on hover */
box-shadow: 0px 0px 20px #000;
nickpad / cloudformation.json
Last active Mar 21, 2019
Example cloudformation template for auto scaling deploys
View cloudformation.json
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Auto scaling deploy example",
"Parameters": {
"AvailabilityZone": {
"Type": "String",
"Default": "us-west-1a"
"ImageId": {
"Type": "String"
hollodotme /
Last active May 10, 2019
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
moshmage / withinRadius.js
Last active Jul 5, 2019
compares two objects lat/lon and returns true if within provided kms
View withinRadius.js
* is One Point within Another
* @param point {Object} {latitude: Number, longitude: Number}
* @param interest {Object} {latitude: Number, longitude: Number}
* @param kms {Number}
* @returns {boolean}
function withinRadius(point, interest, kms) {
'use strict';
View webpack.config.js
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
You can’t perform that action at this time.