This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"syscall" | |
"time" | |
"github.com/lxn/walk" | |
. "github.com/lxn/walk/declarative" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// +build windows | |
package screen | |
import ( | |
"fmt" | |
"image" | |
"reflect" | |
"syscall" | |
"unsafe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ubuntu 16.04 | |
# Prometheus installation. It's a lousy script though. | |
# Example: | |
# chmod +x prometheus.sh | |
# sudo pwd | |
# ./prometheus.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# PARAMETERS | |
# ---------- | |
# PHP | |
# --- | |
PHP_TIMEZONE="UTC" | |
PHP_DIRECTORY="/etc/php5ts" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Deployment server info | |
set :application, "APP NAME" | |
set :domain, "APP DOMAIN NAME" | |
set :deploy_to, "/path/on/live/server" | |
set :app_path, "app" | |
set :web_path, "web" | |
set :maintenance_basename, "maintenance" | |
# SCM info | |
set :repository, "GIT REMOTE REPO URL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An experiment for a capistrano 'stage' that can actually be used to | |
# deploy multiple feature branches at once. | |
# Intended to be installed config/deploy/feature_demo , when using cap | |
# multi-stage support: add 'feature_demo' to 'stages' in `config/deploy.rb` too. | |
# Run from a git feature branch `cap feature_demo deploy` to deploy to | |
# single machine we have all our feature demos on. | |
# Name of feature branch will be taken from current git checkout. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Display unstaged (*) and staged(+) changes | |
export GIT_PS1_SHOWDIRTYSTATE="1" | |
# Display whether there are stashed ($) changes | |
export GIT_PS1_SHOWSTASHSTATE="1" | |
# Display if there are untracked (%) files | |
export GIT_PS1_SHOWUNTRACKEDFILES="1" | |
# Display if we're ahead (>) or behind (<) or diverged (<>) relative | |
# to upstream | |
export GIT_PS1_SHOWUPSTREAM="auto" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
root /home/website/web; | |
rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
try_files $uri @rewriteapp; | |
location @rewriteapp { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// secure hashing of passwords using bcrypt, needs PHP 5.3+ | |
// see http://codahale.com/how-to-safely-store-a-password/ | |
// salt for bcrypt needs to be 22 base64 characters (but just [./0-9A-Za-z]), see http://php.net/crypt | |
// just an example; please use something more secure/random than sha1(microtime) :) | |
$salt = substr(str_replace('+', '.', base64_encode(sha1(microtime(true), true))), 0, 22); | |
// 2a is the bcrypt algorithm selector, see http://php.net/crypt |