Skip to content

Instantly share code, notes, and snippets.

Valmir Barbosa dos Santos valmirphp

Block or report user

Report or block valmirphp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
valmirphp /
Last active Jun 5, 2019 — forked from ghprod/
Auto Restart PHP5-FPM When Down or Bad Gateway
# add cron: */3 * * * * /root/ >> /var/log/nginxfix.log 2>&1
# REF:
if [[ ! "$(/etc/init.d/nginx status)" =~ "active (running)" ]]
echo $(date -u) "NGINX server has been stopped. It has now been restarted."
service nginx start
View Elements
## 1. Create Application
ng g application --prefix=moo --routing=false --skip-tests elements
## 2. Add elements & polyfill
In order to have elements functionality available we need the Angular library and a polyfill — with the new CLI it’s just a matter of one(!) simple command:
valmirphp / vod-svg.js
Last active Feb 18, 2016 — forked from fergalhanley/vod-svg.js
This AngularJS directive allows changing the color of dynamically loaded SVG files. Subject to same domain policy.
View vod-svg.js
.module('', [])
.directive('pmtMap', mapDirective)
.directive('pmtIconSvg', iconSvg2Directive);
function vodSvgDirective() {
return {
restrict: 'E',
replace: 'true',
View Cross domain webfont access
# Cross domain webfont access
location ~* \.(?:ttf|ttc|otf|eot|woff|woff2|svg)$ {
add_header "Access-Control-Allow-Origin" "*";
# Also, set cache rules for webfonts.
# See
# And
# And
valmirphp / Angular
Created Nov 10, 2014
get scope angular
View Angular
var sidebar = document.getElementsByTagName('body');
var scope = angular.element(sidebar).scope();
var rootScope = scope.$root;
View DNS
nslookup -type=MX
You can’t perform that action at this time.