Skip to content

Instantly share code, notes, and snippets.

View phannaly's full-sized avatar
🎴
Trekking

phanna phannaly

🎴
Trekking
View GitHub Profile
@phannaly
phannaly / AuthorizedClients.vue
Created January 14, 2019 17:14
Laravel 5.4 OAuth2 token and client components ported to Vue.js 2 and Bulma with Axios
<style scoped>
.action-link {
cursor: pointer;
}
.m-b-none {
margin-bottom: 0;
}
</style>
@phannaly
phannaly / .htaccess
Created February 7, 2018 01:37 — forked from vielhuber/.htaccess
Apache: htaccess force www and https ssl #server
# force HTTPS and www.
RewriteEngine On
RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR]
RewriteCond %{HTTPS} off
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L]
# alternative way
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
@phannaly
phannaly / .gitlab-ci.yml
Created December 20, 2017 07:06 — forked from spoonerWeb/.gitlab-ci.yml
GitLab CI (version >= 9) configuration for testing and TER uploading TYPO3 extensions
cache:
key: "$CI_COMMIT_REF_NAME/$CI_JOB_STAGE"
paths:
- .composer/
before_script:
# Install git on machine
- apk add git --update
stages:
@phannaly
phannaly / example.js
Created September 6, 2017 08:06 — forked from millermedeiros/example.js
execute multiple shell commands in series on node.js
// USAGE ------
// ============
var shell = require('./shellHelper');
// execute a single shell command
shell.exec('npm test --coverage', function(err){
console.log('executed test');
}});
@phannaly
phannaly / 0_reuse_code.js
Created August 14, 2017 04:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@phannaly
phannaly / composer.json
Created August 5, 2017 03:13 — forked from mfurlend/composer.json
composer require git repository
{
"name": "my_vendor_name/my_package",
"description": "My Package Description",
"license": "GPL-3.0",
"autoload": {
"classmap": [ // search these directories for classes
"lib/"
]
},
"repositories": {
@phannaly
phannaly / flightplan-deploy.md
Created August 1, 2017 04:16 — forked from learncodeacademy/flightplan-deploy.md
Deploy Node.js Apps with Flightplan

##Setup your server (this would ideally be done with automated provisioning)

  • add a deploy user with password-less ssh see this gist
  • install forever npm install -g forever

##Install flightplan

  • npm install -g flightplan
  • in your project folder npm install flightplan --save-dev
  • create a flightplan.js file
@phannaly
phannaly / child-theme-functions.php
Created May 18, 2017 08:47 — forked from lots0logs/child-theme-functions.php
WordPress :: Divi Builder :: Search Module :: Custom Post Types
<?php
function my_remove_default_et_pb_custom_search() {
remove_action( 'pre_get_posts', 'et_pb_custom_search' );
add_action( 'pre_get_posts', 'my_et_pb_custom_search' );
}
add_action( 'wp_loaded', 'my_remove_default_et_pb_custom_search' );
function my_et_pb_custom_search( $query = false ) {
if ( is_admin() || ! is_a( $query, 'WP_Query' ) || ! $query->is_search ) {