Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am thanhphuongat on github.
  • I am thanhphuongat (https://keybase.io/thanhphuongat) on keybase.
  • I have a public key whose fingerprint is 1843 820D 0F5A 06DE 9E3D 1DA0 213C F458 3450 D877

To claim this, I am signing this object:

@tonythere
tonythere / gpg_git_signing.md
Created November 22, 2017 03:11 — forked from alopresto/gpg_git_signing.md
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

  1. Generate and add your key to GitHub
  2. $ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)
  3. $ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)
  4. $ git config --global alias.logs "log --show-signature" (now available as $ git logs)
  5. $ git config --global alias.cis "commit -S" (optional if global signing is false)
  6. $ echo "Some content" >> example.txt
  7. $ git add example.txt
  8. $ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)
@tonythere
tonythere / gen-key-script
Created November 21, 2017 07:47 — forked from woods/gen-key-script
Creating gpg keys non-interactively
Key-Type: 1
Key-Length: 2048
Subkey-Type: 1
Subkey-Length: 2048
Name-Real: Root Superuser
Name-Email: root@handbook.westarete.com
Expire-Date: 0
@tonythere
tonythere / nginx.conf
Created March 6, 2017 04:05 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which

Keybase proof

I hereby claim:

  • I am htphuong on github.
  • I am htphuong (https://keybase.io/htphuong) on keybase.
  • I have a public key ASDu_EbiiboqKRNe3GEsb7tjdnW4Rni-djn_ZcDGn8Q5Rgo

To claim this, I am signing this object:

@tonythere
tonythere / bump-version.sh
Created December 26, 2016 02:41 — forked from mareksuscak/bump-version.sh
Bump version shell script.
#!/bin/bash
# Thanks goes to @pete-otaqui for the initial gist:
# https://gist.github.com/pete-otaqui/4188238
#
# Original version modified by Marek Suscak
#
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3" or even "1.2.3-beta+001.ab"
@tonythere
tonythere / linode.sources.list
Last active July 17, 2017 23:37
ubuntu source list linode
# deb http://mirrors.linode.com/ubuntu/ xenial main restricted
# deb http://mirrors.linode.com/ubuntu/ xenial-updates main restricted
# deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.linode.com/ubuntu/ xenial main restricted
# deb-src http://mirrors.linode.com/ubuntu/ xenial main restricted
[xdebug]
;zend_extension="/usr/local/opt/php70-xdebug/xdebug.so"
; XDEBUG_PROFILE
; /usr/local/opt/php/{version}/conf.d
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "/srv/xdebug-profilers"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
<?php
$m = 5;
$n = 4;
$col_span = 4;
$row_span = 4;
const star = 'O';
const space = ' ';
<?php
/**
* Created by PhpStorm.
* User: phuong
* Date: 5/23/16
* Time: 22:54
*/
$m = 5;
$n = 4;