This file contains 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
SSH_ENV="$HOME/.ssh/environment" | |
# start the ssh-agent | |
function start_agent { | |
echo "Initializing new SSH agent..." | |
# spawn ssh-agent | |
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV" | |
echo succeeded | |
chmod 600 "$SSH_ENV" | |
. "$SSH_ENV" > /dev/null |
This file contains 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() { | |
var duplicatesArray = ['stop', 'pause', 'resume', 'stop']; | |
// Filter function returns a new array | |
var uniqueArray = duplicatesArray.filter(function(ele, pos) { | |
return duplicatesArray.indexOf(ele) === pos; | |
}); | |
// Expected Output: ['stop', 'pause', 'resume'] |
This file contains 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
@echo off | |
SET /P FILENAME=Enter file name:(Default: server) | |
IF "%FILENAME%"=="" SET FILENAME=server | |
@echo off | |
set OPENSSL_CONF=./conf/openssl.cnf | |
if not exist .\conf\ssl.crt mkdir .\conf\%FILENAME%.crt | |
if not exist .\conf\ssl.key mkdir .\conf\ssl.key |
This file contains 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/bash | |
sudo -s | |
add-apt-repository -y ppa:apt-fast/stable | |
apt-get update | |
apt-get install apt-fast | |
add-apt-repository -y ppa:mozillateam/firefox-next | |
add-apt-repository -y ppa:djcj/vlc-stable | |
add-apt-repository -y ppa:danielrichter2007/grub-customizer | |
add-apt-repository -y ppa:versable/elementary-update |
This file contains 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
module.exports = function(grunt) { | |
/** | |
* Load required Grunt tasks. | |
*/ | |
require('load-grunt-tasks')(grunt); // This will allow as to execute `loadNPMTask` for tasks with naming pattern of `grunt-*` | |
require('time-grunt')(grunt); | |
/** | |
* The Grunt Configuration |
This file contains 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
Show hidden characters
{ | |
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment. | |
"browser": true, // Standard browser globals e.g. `window`, `document` | |
"esnext": true, // Allow ES.next specific features such as `const` and `let`. | |
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.). | |
"camelcase": false, // Permit only camelcase for `var` and `object indexes`. | |
"curly": false, // Require {} for every new block or scope. | |
"eqeqeq": true, // Require triple equals i.e. `===`. | |
"immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` | |
"latedef": false, // Prohibit variable use before definition. |
This file contains 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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} -s [OR] | |
RewriteCond %{REQUEST_FILENAME} -l [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^.*$ - [NC,L] | |
RewriteRule ^(.*) /index.html [NC,L] | |
</IfModule> |
This file contains 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
# ###################################################################### | |
# # WEB PERFORMANCE # | |
# ###################################################################### | |
# ---------------------------------------------------------------------- | |
# | Compression | | |
# ---------------------------------------------------------------------- | |
<IfModule mod_deflate.c> |
This file contains 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
# ---------------------------------------------------------------------- | |
# | File access | | |
# ---------------------------------------------------------------------- | |
# Block access to directories without a default document. | |
# | |
# You should leave the following uncommented, as you shouldn't allow | |
# anyone to surf through every directory on your server (which may | |
# includes rather private places such as the CMS's directories). |
This file contains 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
# ###################################################################### | |
# # CROSS-ORIGIN # | |
# ###################################################################### | |
# ---------------------------------------------------------------------- | |
# | Cross-origin requests | | |
# ---------------------------------------------------------------------- | |
# Allow cross-origin requests. | |
# |
OlderNewer