# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
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 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) { | |
colors.setToolbarBackgroundColor(palette.getDarkVibrantSwatch().getRgb()); | |
colors.setTextColor(palette.getDarkVibrantSwatch().getBodyTextColor()); | |
colors.setTitleColor(palette.getDarkVibrantSwatch().getTitleTextColor()); |
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
// 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++) { | |
nodes[i].removeChild(nodes[i].childNodes[0]); | |
} |
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
<?php | |
namespace App\Http\Controllers\Admin\API; | |
use App\Http\Controllers\Controller; | |
use App\Models\Channel; | |
use Illuminate\Http\Request; | |
class Centrifuge extends Controller | |
{ |
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
a:hover { | |
/* border glow effect on hover */ | |
box-shadow: 0px 0px 20px #000; | |
filter:progid:DXImageTransform.Microsoft.Glow(Color=black,Strength=20); | |
} |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Auto scaling deploy example", | |
"Parameters": { | |
"AvailabilityZone": { | |
"Type": "String", | |
"Default": "us-west-1a" | |
}, | |
"ImageId": { | |
"Type": "String" |
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
/** | |
* 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'; |
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
$(window).on("scroll", function() { | |
var scrollHeight = $(document).height(); | |
var scrollPosition = $(window).height() + $(window).scrollTop(); | |
if ((scrollHeight - scrollPosition) / scrollHeight === 0) { | |
// when scroll to bottom of the page | |
} | |
}); |
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.
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
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" |
OlderNewer