I was trying to understand JavaScript Promises by using various libraries (bluebird, when, Q) and other async approaches.
I read the spec, some blog posts, and looked through some code. I learned how to
import java.io.FileDescriptor; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
public class HelloWorld{ | |
private static HelloWorld instance; | |
public static void main(String[] args){ | |
instantiateHelloWorldMainClassAndRun(); |
APP_ENV=testing | |
APP_KEY=SomeRandomString | |
DB_CONNECTION=testing | |
DB_TEST_USERNAME=root | |
DB_TEST_PASSWORD= | |
CACHE_DRIVER=array | |
SESSION_DRIVER=array | |
QUEUE_DRIVER=sync |
A collection of things that can be done to make handling dates in Laravel much easier (if you deal with date formats that are not english) |
I was trying to understand JavaScript Promises by using various libraries (bluebird, when, Q) and other async approaches.
I read the spec, some blog posts, and looked through some code. I learned how to
'use strict'; | |
var AWS = require('aws-sdk'); | |
var S3 = new AWS.S3(); | |
var readline = require('readline'); | |
exports.handler = function (event, context) { | |
//Get S3 file bucket and name | |
//Make sure to loop through event.Records, don't assume there is only 1 in production!!! | |
var bucket = event.Records[0].s3.bucket.name; | |
var key = event.Records[0].s3.object.key; |
¯\_(ツ)_/¯
<script>console.log({{ product | json }});</script> |
# Convert images from folder | |
## Installation | |
You need to download libwebp and put in the shell script folder. | |
You must have installed the jpegoptim, giflossy (gifsicle), pngquant and imagemagick library. | |
## Usage | |
Convert folder and put results in the results folder |
fn is_prime(n: usize, primes: &Vec<usize>) -> bool { | |
for &p in primes { | |
let q = n / p; | |
if q < p { return true }; | |
let r = n - q * p; | |
if r == 0 { return false }; | |
} | |
panic!("too few primes") | |
} |
/* | |
* Type definitions for ExcelJS | |
* Project: https://github.com/guyonroche/exceljs | |
* Definitions by: Rycochet https://github.com/Rycochet | |
* | |
* This is a WIP | |
*/ | |
declare namespace ExcelJS { | |
type Zip = any; |