I use GM to render thumbnails of png and jpg images.
Sadly the GM installation guide doesn't describe how to get things working on AWS EC2.
<?php | |
//original article is here http://css-tricks.com/snippets/php/sanitize-database-inputs/ | |
function cleanInput($input) { | |
$search = array( | |
'@<script[^>]*?>.*?</script>@si', // Strip out javascript | |
'@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags |
FROM ubuntu:14.04 | |
MAINTAINER "Chris White" <chris@cwhite.me> | |
# Use bash instead of sh | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
# Install required packages | |
RUN apt-get update | |
RUN apt-get install -y curl git nginx php5-cli php5-fpm php5-mysql php5-mcrypt php5-curl php5-gd supervisor | |
RUN php5enmod mcrypt |
#! /usr/bin/python | |
import sys | |
from time import sleep | |
import subprocess | |
from subprocess import call | |
import logging | |
import threading | |
import urllib | |
import json | |
from colorsys import hsv_to_rgb |
git log --pretty='format:%B' master.. | |
| egrep -o "PROJ-[[:digit:]]{1,}" | |
| sort | |
| uniq | |
| xargs -I % sh -c 'curl -u $JIRA_AUTH -H "Content-Type: application/json" https://yourjira.atlassian.net/rest/api/2/issue/%' | |
| jq -r '[.key, .fields.issuetype.name, .fields.assignee.displayName, .fields.status.name, .fields.summary] | "\(.[0]): (\(.[1]), \(.[3])) \(.[4]) | \(.[2])"' | |
# output: | |
# | |
# PROJ-1234: (Story, Done) The summary of the ticket | Assignee Name |
#!/usr/bin/env python3 | |
# first author: Edoardo Paolo Scalafiotti <edoardo849@gmail.com> | |
# Edits done by: Marco Bosch <marcogithub@hotmail.com> | |
import os | |
from time import sleep | |
import signal | |
import sys | |
import RPi.GPIO as GPIO |
/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background |
Step 1: Create Certificate .pem from Certificate .p12 | |
Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12 | |
Step 2: Create Key .pem from Key .p12 | |
Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12 | |
Step 3: Optional (If you want to remove pass phrase asked in second step) | |
Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem | |
Step 4: Now we have to merge the Key .pem and Certificate .pem to get Development .pem needed for Push Notifications in Development Phase of App |
I use GM to render thumbnails of png and jpg images.
Sadly the GM installation guide doesn't describe how to get things working on AWS EC2.
# based on https://github.com/amber-sixel/PythonCatPrinter.git | |
# can be used as a raw postscript printer (a4, one page only) on port 9100 | |
# | |
# status : curl --location --request GET 'localhost:5000' | |
# | |
# curl --location --request POST 'localhost:5000' \ | |
# --form 'image=@"/image.jpg"' \ #optional | |
# --form 'text="hello world"' \ #optional | |
# --form 'size="48"' \ #optional |
<?php | |
/** | |
* Laravel Passport - Customize Token response. | |
* | |
* @author Messi89 OVERGEN <@messi89minou> | |
* @link https://github.com/messi89 | |
*/ | |
namespace App\Http\Controllers\Api; | |
use App\Models\User; |