TODO: Write a project description
TODO: Describe the installation process
| ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### | |
| ### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget / curl. | |
| ### You can download all the binaries one-shot by just providing one BASE_URL. | |
| ### Script might be useful if you need Oracle JDK on Amazon EC2 env. | |
| ### Script is updated for every JDK release. | |
| ### Features:- | |
| # 1. Resumes a broken / interrupted [previous] download, if any. | |
| # 2. Renames the file to a proper name with including platform info. |
| { | |
| "AWSTemplateFormatVersion": "2010-09-09", | |
| "Description": "VPC knowhow template", | |
| "Parameters": { | |
| "KeyName": { | |
| "Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances", | |
| "Type": "String", | |
| "MinLength": "1", | |
| "MaxLength": "64", | |
| "AllowedPattern": "[-_ a-zA-Z0-9]*", |
| import Foundation | |
| import PlaygroundSupport | |
| /// A thread-safe array. | |
| public class SynchronizedArray<Element> { | |
| fileprivate let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent) | |
| fileprivate var array = [Element]() | |
| } | |
| // MARK: - Properties |
| import UIKit | |
| import Photos | |
| extension PHPhotoLibrary { | |
| // MARK: - PHPhotoLibrary+SaveImage | |
| // MARK: - Public | |
| func savePhoto(image:UIImage, albumName:String, completion:((PHAsset?)->())? = nil) { | |
| func save() { |
| #!/bin/bash | |
| # | |
| # /etc/init.d/storm-nimbus | |
| # | |
| # Startup script for storm-nimbus | |
| # | |
| # chkconfig: 2345 20 80 | |
| # description: Starts and stops storm-nimbus | |
| #. /etc/init.d/functions | |
| stormBin=/home/user/storm/storm-0.8.1/bin/storm |
| using System; | |
| using System.Collections.Concurrent; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| namespace FileCombiner | |
| { | |
| class Program |
| public class RedisClient { | |
| private JedisPool pool; | |
| @Inject | |
| public RedisClient(Settings settings) { | |
| try { | |
| pool = new JedisPool(new JedisPoolConfig(), settings.get("redis.host"), settings.getAsInt("redis.port", 6379)); | |
| } catch (SettingsException e) { | |
| // ignore |
| var db = openDatabase("example_db", "", "Example Database", 100000); | |
| // openDatabase(db name, required version (blank string for n/a), human-readable database name, expected size in bytes) | |
| db.changeVersion("", "1", function(t){ | |
| t.executeSql("create table ..."); | |
| }); | |
| /* Note: | |
| openDatabase actually takes one more (optional) argument -- a callback in case the database was /just/ created, for you to call changeVersion and provide an initial schema. However, since this post is more interested in migrations, and because I don't want the initial migration to be a "special case", I'm pretending like it doesn't exist. It's there if you want it, of course. | |
| */ |