echo "This is the body" | mail -r notifications -s "This is the subject" [email protected] ; tail -f /var/log/maillog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function slugify (text, ampersand = 'and') { | |
const a = 'àáäâèéëêìíïîòóöôùúüûñçßÿỳýœæŕśńṕẃǵǹḿǘẍźḧ' | |
const b = 'aaaaeeeeiiiioooouuuuncsyyyoarsnpwgnmuxzh' | |
const p = new RegExp(a.split('').join('|'), 'g') | |
return text.toString().toLowerCase() | |
.replace(/[\s_]+/g, '-') // Replace whitespace and underscore with single hyphen | |
.replace(p, c => | |
b.charAt(a.indexOf(c))) // Replace special chars | |
.replace(/&/g, `-${ampersand}-`) // Replace ampersand with custom word |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
###################################################################### | |
# Auto renew Let's Encrypt certs script for Nginx server configs | |
###################################################################### | |
# | |
# README: | |
# This script renew previous certs ONLY. | |
# Make sure you have "certbot" installed and have created your first | |
# certs before to run it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app/Http/Middleware/AssetUrls.js | |
// Middle where to load mix-manifest.json | |
// file Laravel Mix generates | |
class AssetUrls { | |
* handle (request, response, next) { | |
const View = use('View') | |
View.global('assetUrls', function () { | |
return require('../../../public/mix-manifest.json') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// src/Foobar/Controller/FooController.php | |
namespace Foobar\Controller; | |
class FooController | |
{ | |
public function helloAction($request) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var externalModules = [ | |
'fs', | |
'events', | |
'react', | |
'react-addons', | |
'lodash' | |
]; | |
module.exports = { | |
vendors: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var source = require('vinyl-source-stream'); | |
var libs = ["underscore", "jquery"]; | |
gulp.task("vendor", function () { | |
var b = browserify(); | |
libs.forEach(function (lib) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AnnouncementList | |
// <AnnouncementList/> | |
import React from 'react'; | |
import marked from 'marked'; | |
var AnnouncementsList = React.createClass({ | |
renderAnnouncement : function(key) { | |
// var linkState = this.props.linkState; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// App | |
// <App/> | |
import React from 'react'; | |
import Header from './Header'; | |
import SenderNav from './SenderNav'; | |
import Dashboard from './Dashboard'; | |
import AnnouncementsList from './Announcements/AnnouncementsList'; |