Skip to content

Instantly share code, notes, and snippets.

View dennis-8's full-sized avatar

Dennis N. dennis-8

View GitHub Profile
@dennis-8
dennis-8 / laravel-queue.service
Created February 9, 2017 15:40 — forked from thomasjsn/laravel-queue.service
Laravel queue worker using systemd.
# Laravel queue worker using systemd
# ----------------------------------
#
# /lib/systemd/system/queue.service
#
# run this command to enable service:
# systemctl enable queue.service
[Unit]
Description=Laravel queue worker
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@dennis-8
dennis-8 / gist:e88a64a3d8cf4393bf645c9ecae398b0
Last active July 16, 2018 10:15
Default binding values for AngularJS
ctrl.$onInit = function() {
if (angular.isUndefined(ctrl.layout) || ctrl.layout === null) {
ctrl.layout = 'column';
}
}
or
@dennis-8
dennis-8 / gist:58aa88db0812b87a4741cb209ea6f1d4
Created July 2, 2018 08:25
ui-router, child to parent navigation without refresh
To stop refreshing use dynamic params.
@dennis-8
dennis-8 / gist:d673f6e6e37a97a669cb7aaf604c5d94
Created July 14, 2018 13:31
Hide or show DOM element depending on UI-Router state
You can use isState filter with either ng-show or ng-hide.
@dennis-8
dennis-8 / gist:23ca5d036ae7e305a1c1467bc717b62f
Created July 26, 2018 21:58
Change ExecJS runtime in RoR
How to change ExecJS runtime in RoR
# config is located here: /etc/nginx/sites-available
# Default server configuration
#
server {
listen 80 default_server;
listen [::]:80 default_server;
@dennis-8
dennis-8 / gist:b3f70969e64a2fb2a70ca674ef93f3eb
Created August 13, 2018 12:31
How to add ng-model functionality to AngularJS component
Link: https://stackoverflow.com/questions/44594532/how-to-add-ng-model-functionality-to-a-component/44595910#44595910
@dennis-8
dennis-8 / gist:ffe0d50160bfbfe94b15ad3e1ea7a8bd
Created August 14, 2018 10:42
AngularJS component - check if method callback is present
https://stackoverflow.com/a/38914917
Link: https://sindresorhus.com/multi-download/browser.js