Skip to content

Instantly share code, notes, and snippets.

@jice-lavocat
jice-lavocat / start_containers.conf
Created January 30, 2016 16:49
Upstart Docker-Compose on Ubuntu
# File is saved under /etc/init/start_containers.conf
# After file is modified, update config with : $ initctl reload-configuration
description "Start containers (see http://askubuntu.com/a/22105 and http://askubuntu.com/questions/612928/how-to-run-docker-compose-at-bootup)"
start on filesystem and started docker
stop on runlevel [!2345]
# if you want it to automatically restart if it crashes, leave the next line in
# respawn # might cause over charge
@jice-lavocat
jice-lavocat / swtln.css
Created November 23, 2015 09:46
Tweetwall css
header.head {
height:200px;
background:url('../img/swtln.png?1436228541') no-repeat center;
margin-right: 1100px;
/*float: left;*/
}
.blue {
color:#FFF
}
<?php
$target="http://www.wordiz.it";
$data="f.req=%5B%22".$target."%22%2Cnull%5D&";
$url = "https://plus.google.com/u/0/ripple/update";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
@jice-lavocat
jice-lavocat / imageSyncing.js
Last active May 6, 2022 05:18
AWS Lambda - S3 : Thumbnail creation
// dependencies
var async = require('async');
var path = require('path');
var AWS = require('aws-sdk');
var gm = require('gm').subClass({
imageMagick: true
});
var util = require('util');
// get reference to S3 client
var s3 = new AWS.S3();
@jice-lavocat
jice-lavocat / index.html
Created September 10, 2015 08:56
Getting Fb, Twitter and G+ count with JS (in 2015)
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<script src="https://apis.google.com/js/client:plusone.js" type="text/javascript"></script>
<script src="social_count.js"></script>
<h1>Social count</h1>
<script type="text/javascript">
$(document).ready(function($){
var url = window.location.href;
var iddivTwit="#twitter<?php echo $randid; ?>";