Skip to content

Instantly share code, notes, and snippets.

View printminion's full-sized avatar
💭
Time flies like an arrow; fruit flies like a 🍌

@printminion printminion

💭
Time flies like an arrow; fruit flies like a 🍌
View GitHub Profile
@printminion
printminion / config.yaml
Created January 6, 2016 16:56 — forked from jahvi/config.yaml
PuPHPet Magento 1 and 2 config
vagrantfile:
target: local
vm:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
hostname: vagrant.dev
memory: '768'
cpus: '1'
chosen_provider: virtualbox
network:
<?php
/**
* Generate modman file from Magento Connect 2.0 package.xml
*
* Usage:
*
* php package2modman.php path/to/package.xml > path/to/modman
*
*/
require_once(__DIR__ . "/../app/Mage.php");
@printminion
printminion / deploy.sh
Created October 18, 2015 18:25 — forked from joestump/deploy.sh
Using modern JavaScript and CI tooling for Google Apps Scripts
#!/bin/bash
npm run build
gas deploy -s ./conf/$CLIENT_SECRETS -c ./conf/$OAUTH_CREDENTIALS -b ./build -f $GAS_FILE_ID
@printminion
printminion / giffify.bat
Last active August 29, 2015 14:27 — forked from ndorigatti/giffify.bat
Giffify - easily create optimised GIFs from a video (On Windows). This assumes you have ffmpeg.exe in the same folder or in the System PATH.
@echo off
REM !/bin/sh
REM License for any modification to the original (linked below):
REM ----------------------------------------------------------------------------
REM "THE BEER-WARE LICENSE" (Revision 42):
REM Sebastiano Poggi wrote this file. As long as you retain this notice you
REM can do whatever you want with this stuff. If we meet some day, and you think
REM this stuff is worth it, you can buy me a beer in return.
REM ----------------------------------------------------------------------------
REM
@printminion
printminion / Graph
Last active January 8, 2018 12:51 — forked from lolu/Graph
Status: not working
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

sha256sum -b ./dbapp.war > ./dbapp.sha256
gsutil cp ./dbapp.war ./dbapp.sha256 gs://stathy/${JOB_NAME}/${BUILD_NUMBER}/
gsutil setacl public-read gs://stathy/${JOB_NAME}/${BUILD_NUMBER}/dbapp.war
gsutil setacl public-read gs://stathy/${JOB_NAME}/${BUILD_NUMBER}/dbapp.sha256
cd ${WORKSPACE}
gcutil addinstance dbapp-db dbapp-app1 dbapp-lb \
--project "opscode.com:stathy" --image "/projects/opscode.com:stathy/images/centos-latest" \
username: vagrant
password: vagrant
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev
sudo aptitude install mysql-server mysql-client
sudo nano /etc/mysql/my.cnf
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';