Skip to content

Instantly share code, notes, and snippets.

View kujiy's full-sized avatar

Kujiy kujiy

View GitHub Profile
@cowboy
cowboy / github_post_recieve.php
Created October 11, 2010 02:04
GitHub PHP webhook to auto-pull on repo push
<?php
// Use in the "Post-Receive URLs" section of your GitHub repo.
if ( $_POST['payload'] ) {
shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' );
}
?>hi
@lackac
lackac / haproxy.cfg
Created September 22, 2012 19:14
HAProxy configuration with Websocket support
global
maxconn 4096 # Total Max Connections. This is dependent on ulimit
nbproc 2
log 127.0.0.1 local1 notice
defaults
mode http
log global
frontend all 0.0.0.0:80
@branquito
branquito / Terminal.sublime-settings
Created April 25, 2013 16:48
open git bash using `terminal` plugin for sublime
{
// The command to execute for the terminal, leave blank for the OS default
// On OS X the terminal can be set to iTerm.sh to execute iTerm
"terminal": "C:\\Windows\\System32\\cmd.exe",
// A list of default parameters to pass to the terminal, this can be
// overridden by passing the "parameters" key with a list value to the args
// dict when calling the "open_terminal" or "open_terminal_project_folder"
// commands
"parameters": ["/c sh --login -i"]
<?php
// Use in the "Post-Receive URLs" section of your Bitbucket repo.
if ( $_POST['payload'] ) {
$data = json_decode($_POST['payload']);
$commits = $data->{"commits"};
@kazuhisya
kazuhisya / sorry-to-Ishikawa-san.sh
Last active February 27, 2019 17:55
石川さんごめんなさいのおまじない。
#!/usr/bin/env bash
echo "I'm sorry Ishikawa-san."
echo "I'm sorry Ishikawa-san."
echo "I'm sorry Ishikawa-san."
sed --follow-symlinks -i 's;SELINUX=enforcing;SELINUX=disabled;g' /etc/sysconfig/selinux
setenforce 0
@hyamamoto
hyamamoto / vimdiff.md
Created December 4, 2013 08:16
The vimdiff cheat sheet as a git mergetool.

vimdiff cheat sheet

This is a vimdiff cheat sheet as a git mergetool.

Commands

]c - go to next difference 
@numeraltwo
numeraltwo / git_aliases
Created January 31, 2014 17:00
useful git and git-flow aliases
# GIT / GIT FLOW ALIASES
alias gs="git stash"
alias gsa="git stash apply"
alias gsl="git stash list"
alias gsc="git stash clear"
alias gft="git fetch --tags"
alias gpt="git push --tags"
alias gcm="git checkout master"
@titpetric
titpetric / setup_ssmtp.bash
Created April 13, 2017 21:27
setting up ssmtp config from environment variables (docker start-up script)
#!/bin/bash
#
# You can set up sSMTP by setting the following ENV variables:
#
# SSMTP_TO - This is the address alarms will be delivered to.
# SSMTP_SERVER - This is your SMTP server. Defaults to smtp.gmail.com.
# SSMTP_PORT - This is the SMTP server port. Defaults to 587.
# SSMTP_USER - This is your username for the SMTP server.
# SSMTP_PASS - This is your password for the SMTP server. Use an app password if using Gmail.
# SSMTP_TLS - Use TLS for the connection. Defaults to YES.
@RyujiAMANO
RyujiAMANO / EncryptSha1Password.class.php
Created February 20, 2018 08:02
XOOPS Cube Legacy2.2でパスワードをsha1で保存するpreload
<?php
// そのままでは動きません
if (!defined('XOOPS_ROOT_PATH')) {
exit();
}
class EncryptSha1Password extends XCube_ActionFilter
{
public function preFilter()
{
@robstradling
robstradling / Makefile
Last active November 5, 2020 07:26
Parse Chrome EV metadata
chrome_ev:
gcc -o chrome_ev chrome_ev.cc