Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| /** | |
| * Optimize image image | |
| * | |
| * https://developers.google.com/speed/docs/insights/OptimizeImages | |
| * -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace sRGB | |
| * | |
| * @access public | |
| * @param string $filePath Path of the file | |
| * @return string Raw image result from the process | |
| */ |
| #!/bin/bash | |
| # mytop.sh - (Monitor mysql process list with top like screen updates and adiditonal stats like cpu/io usage) | |
| # | |
| # Sample Output: | |
| # | |
| # CPU Usage 3.29% user 1.60% system 3.37% io wait 0.00% steal 91.59% idle | |
| # Up 17 days 10 hours Load Avg 0.43 0.36 0.35 Processes 1(running) 408(total) Last PID 17825 | |
| # +----------+------+-----------+----+---------+------+-------+------------------+ | |
| # | Id | User | Host | db | Command | Time | State | Info | | |
| # +----------+------+-----------+----+---------+------+-------+------------------+ |
| 'use strict'; | |
| const AWS = require("aws-sdk"); | |
| const dynamodb = new AWS.DynamoDB(); | |
| const querystring = require("querystring"); | |
| const http = require("https"); | |
| const TWITTER_API_URL = "https://api.twitter.com" | |
| const TWITTER_HOSTNAME = "api.twitter.com" | |
| /** |
| FROM ubuntu:16.04 | |
| MAINTAINER Ben Hardill <hardillb@gmail.com> | |
| ENV DEBIAN_FRONTEND noninteractive | |
| USER root | |
| RUN apt-get update && apt-get install -y \ | |
| pkg-config \ |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| <?php | |
| ini_set('max_execution_time', 0); | |
| ini_set('memory_limit' , '500M'); | |
| class convert2bloger { | |
| private $database = NULL; | |
| private $errors = array(); | |
| private $curEntry = array(); // current entry of the parser |
| #include "FastLED.h" | |
| // FastLED "100-lines-of-code" demo reel, showing just a few | |
| // of the kinds of animation patterns you can quickly and easily | |
| // compose using FastLED. | |
| // | |
| // This example also shows one easy way to define multiple | |
| // animations patterns and have them automatically rotate. | |
| // | |
| // -Mark Kriegsman, December 2014 |
| <?php | |
| /** | |
| * Command for losslessly compressing Amazon AWS images | |
| */ | |
| use Illuminate\Console\Command; | |
| use Symfony\Component\Console\Input\InputOption; | |
| use Symfony\Component\Console\Input\InputArgument; | |
| /** |
| <?php | |
| function compose(callable $initial, callable ...$functions) | |
| { | |
| if (count($functions) < 1) { | |
| throw new \InvalidArgumentException('at least two functions are required'); | |
| } | |
| return array_reduce($functions, function ($f, $g) { | |
| return function (...$args) use ($f, $g) { | |
| return $f($g(...$args)); |
| <?php | |
| /* | |
| * The MIT License | |
| * | |
| * Copyright 2016 Steve Guidetti. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights |