Skip to content

Instantly share code, notes, and snippets.

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 2, 2024 15:55
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@M165437
M165437 / db-connect-test.php
Last active May 26, 2023 05:34 — forked from chales/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
@theodorosploumis
theodorosploumis / install_php.sh
Last active November 29, 2019 11:05
Install php7 with useful extension on Ubuntu xenial 16.10
sudo apt-get purge php5-common -y
#sudo apt-get install php7.0 php7.0-fpm php7.0-mysql -y
sudo apt-get install -y \
php \
libapache2-mod-php \
php-fpm \
php-mysql \
php-memcached \
php-pear \
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@awesome
awesome / how-to-get-the-directory-of-the-current-file-using-ruby.rb
Last active December 15, 2022 20:23
how to get the directory of the current file using ruby #soawesomeman
# UPDATE: Ruby 2.0.0 https://docs.ruby-lang.org/en/2.0.0/Kernel.html#method-i-__dir__
# $ ruby -v
# ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
# $ pwd
# /Users/dev/Documents/Github/Gists/awesome/
# $ echo "puts __dir__" > how-to-get-the-directory-of-the-current-file-using-ruby-2-0-0.rb
# $ cat how-to-get-the-directory-of-the-current-file-using-ruby-2-0-0.rb
# puts __dir__
# $ ruby how-to-get-the-directory-of-the-current-file-using-ruby-2-0-0.rb
@hofmannsven
hofmannsven / README.md
Last active April 19, 2024 13:17
Git CLI Cheatsheet
@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;