Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@alexglue
alexglue / setup github issues labels.sh
Created November 3, 2016 12:14 — forked from rentzsch/setup github issues labels.sh
Shell script to set up a GitHub Project's Issues' Labels as described in <http://rentzsch.tumblr.com/post/252878320/my-lighthouse-ticket-settings-with-colors>. WARNING: script assumes a newish project that hasn't really used labels yet. It deletes all default labels, which means DATA LOSS if you've used them for anything.
USER=rentzsch
PASS=mypassword
REPO=mogenerator
# Delete default labels
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/bug"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/duplicate"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/enhancement"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/invalid"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/question"
@alexglue
alexglue / phalcon-user-plugin_schema.sql
Created March 14, 2015 19:11
calinrada/PhalconUserPlugin for postgres sql scheme init file
CREATE SCHEMA IF NOT EXISTS public;
SET SEARCH_PATH TO PUBLIC;
CREATE TABLE IF NOT EXISTS locations (
id BIGSERIAL PRIMARY KEY,
language CHAR(2) DEFAULT NULL,
formatted_address VARCHAR(160) DEFAULT NULL,
city VARCHAR(100) DEFAULT NULL,
country VARCHAR(100) DEFAULT NULL,
latitude REAL DEFAULT NULL,
@alexglue
alexglue / phalcon.nginx.conf
Created February 22, 2015 12:03
Template for phalcon+nginx+php-fpm sites-enabled
#template for phalcon+nginx+php-fpm sites-enabled
upstream phalcon-php-fpm {
server unix:/var/run/php5-fpm.sock;
#server 127.0.0.1:9001;
}
server {
listen 80;
server_name $SERVER_NAME;
@alexglue
alexglue / nginx.conf
Last active August 29, 2015 14:13
Yii nginx+php-fpm minimal nginx.conf #devel
upstream yii-php-fpm {
server unix:/var/run/php5-fpm.sock;
#server 127.0.0.1:9001;
}
server {
listen 80 default;
server_name localhost;
@alexglue
alexglue / DateTimeFilter
Created December 30, 2014 16:47
Phalcon DateTimeFilter implementation (instance of PhalconUserFilter)
<?php
/**
* DatetimeFilter
*
* @author glue
* @date 30.12.14
* @example usage
*
@alexglue
alexglue / nginx.conf
Created December 5, 2014 17:47
nginx minimal.conf (for my own personal purposes)
user www-data;
worker_processes 20;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
worker_rlimit_nofile 30000;
events {
worker_connections 2048;
}
@alexglue
alexglue / nginx.conf
Last active August 29, 2015 14:10
Phalcon nginx+php-fpm minimal configuration
upstream phalcon-php-fpm {
server unix:/var/run/php5-fpm.sock;
#server 127.0.0.1:9001;
}
server {
listen 80;
server_name sitename.loc; #do not forget to add "127.0.0.1 sitename.loc" string to your /etc/hosts
set $root_path '/home/user/proj/phalcon/sitename/public';
@alexglue
alexglue / nginx.conf
Last active August 29, 2015 14:10 — forked from leon/nginx.conf
Symfony2 minimal nginx+php-fpm configuration
upstream symfony2-php-fpm {
server unix:/var/run/php5-fpm.sock;
#server 127.0.0.1:9001;
}
server {
listen 80;
server_name sitename;
root /var/www/$host/web;