Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
/** | |
* Create a web friendly URL slug from a string. | |
* | |
* Requires XRegExp (http://xregexp.com) with unicode add-ons for UTF-8 support. | |
* | |
* Although supported, transliteration is discouraged because | |
* 1) most web browsers support UTF-8 characters in URLs | |
* 2) transliteration causes a loss of information | |
* | |
* @author Sean Murphy <sean@iamseanmurphy.com> |
#!/bin/bash | |
MONGO_DATABASE="your_db_name" | |
APP_NAME="your_app_name" | |
MONGO_HOST="127.0.0.1" | |
MONGO_PORT="27017" | |
TIMESTAMP=`date +%F-%H%M` | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
BACKUPS_DIR="/home/username/backups/$APP_NAME" |
<? | |
//Include Predis library. See https://github.com/nrk/predis for more info | |
require "Predis/Autoloader.php"; | |
//Connect to Redis | |
Predis\Autoloader::register(); | |
try { | |
$redis = new Predis\Client(); | |
$redis = new Predis\Client(array( | |
"scheme" => "tcp", |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
// we have an array of objects, we want to remove one object using only the id property | |
const apps = [{id:34,name:'My App',another:'thing'},{id:37,name:'My New App',another:'things'}]; | |
// get index of object with id of 37 | |
const removeIndex = apps.findIndex( item => item.id === 37 ); | |
// remove object | |
apps.splice( removeIndex, 1 ); | |
<?php | |
/** | |
* Add rest api endpoint for category listing | |
*/ | |
/** | |
* Class Category_List_Rest | |
*/ | |
class Category_List_Rest extends WP_REST_Controller { | |
/** |
const axios = require('axios') | |
/* ... */ | |
const params = new URLSearchParams() | |
params.append('name', 'Akexorcist') | |
params.append('age', '28') | |
params.append('position', 'Android Developer') | |
params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/') | |
params.append('awesome', true) |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script> | |
<form id="myForm" name="myForm" action="#" method="POST"> <style>#email-error { display: block; color: red; }</style> | |
<label for="email">Email: </label> | |
<input id="email" name="email" type="email" minlength="6"/><br> | |
<input type="submit" value="Submit"> | |
</form> |
After download and move to your interested folder, add this line to ~/.bashrc and ~/.profile
export GOPATH=$HOME/gowork
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOPATH/bin
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin