Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
import com.jolbox.bonecp.BoneCPDataSource | |
import org.codehaus.groovy.grails.commons.ConfigurationHolder as CH | |
import org.codehaus.groovy.grails.commons.ApplicationHolder as AH | |
import com.burtbeckwith.grails.plugin.datasources.DatasourcesBuilder | |
import grails.util.Environment | |
beans = { | |
def ds = CH.config.dataSource | |
def dsClosure = { bean -> | |
bean.destroyMethod = 'close' |
package org.test.quartz.jobs; | |
import org.springframework.batch.core.JobParameters; | |
import org.springframework.batch.core.JobParametersBuilder; | |
import org.springframework.batch.core.launch.JobLauncher; | |
class DailyBatch { | |
static triggers = { | |
simple name:'simpleTrigger', startDelay:90000, repeatInterval: 600000 |
var data = "do shash'owania"; | |
var crypto = require('crypto'); | |
crypto.createHash('md5').update(data).digest("hex"); |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
import org.mozilla.javascript.Context; | |
import org.mozilla.javascript.Function; | |
import org.mozilla.javascript.NativeObject; | |
import org.mozilla.javascript.Scriptable; | |
import org.mozilla.javascript.commonjs.module.Require; | |
import org.mozilla.javascript.commonjs.module.RequireBuilder; | |
import org.mozilla.javascript.commonjs.module.provider.SoftCachingModuleScriptProvider; | |
import org.mozilla.javascript.commonjs.module.provider.UrlModuleSourceProvider; | |
import java.io.File; |
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
Max Goldstein | July 30, 2015 | Elm 0.15.1
In Elm, signals always have a data source associated with them. Window.dimensions
is exactly what you think it is, and you can't send your own events on it. You can derive your own signals from these primitives using map
, filter
, and merge
, but the timing of events is beyond your control.
This becomes a problem when you try to add UI elements. We want to be able to add checkboxes and dropdown menus, and to receive the current state of these elements as a signal. So how do we do that?
ES7 | core.async |
---|---|
async function() {...} |
(fn [] (go ...)) |
await ... |
(<! ...) |
await* or Promise.all(...) |
(doseq [c ...] (<! c)) |
A quick note on how I'm currently handling Blue/Green or A/B deployments with Terraform and AWS EC2 Auto Scaling.
In my particular use case, I want to be able to inspect an AMI deployment manually before disabling the previous deployment.
Hopefully someone finds this useful, and if you have and feedback please leave a comment or email me.
I build my AMI's using Packer and Ansible.