% vnc start
% vnc stop
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
client.on('message', msg => { | |
if (msg.content === 'ping') { | |
msg.reply('pong'); | |
} | |
}); |
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
var Discord = require('discord.io'); | |
var logger = require('winston'); | |
var auth = require('./auth.json'); | |
// Configure logger settings | |
logger.remove(logger.transports.Console); | |
logger.add(logger.transports.Console, { | |
colorize: true | |
}); | |
logger.level = 'debug'; | |
// Initialize Discord Bot |
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
# Default - Block direct IP access | |
<VirtualHost your-ip-address:80> | |
ServerName your-ip-address | |
Redirect 403 / | |
ErrorDocument 403 "Sorry, direct IP access not allowed." | |
UseCanonicalName Off | |
</VirtualHost> | |
# Include HTTPS | |
<VirtualHost your-ip-address:443> | |
ServerName your-ip-address |
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
{ | |
"name": "greeter-bot", | |
"version": "1.0.0", | |
"description": "My own Discord bot", | |
"main": "bot.js", | |
"author": "YOUR-NAME-HERE", | |
"dependencies": {} | |
} |
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
var yourString = "davao city"; | |
var result = yourString.replace(/(^|\s)[a-z]/gm, c => c.toUpperCase()); | |
console.log(result); // Davao City |
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
angular.module('app.services', []) | |
.factory('GithubProvider', ['$http', '$q', function($http, $q){ | |
return { | |
fetchUser: fetchUser, | |
fetchRepo: fetchRepo | |
}; | |
/** |
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 | |
SSH_FILE=$HOME/.ssh/liirn | |
LIIRN_PLATFORM="$HOME/Documents/Work/Project-LIIRN/platform" | |
LIIRN_APPS=$LIIRN_PLATFORM/web/docker_django/apps | |
LIIRN_LANDING=$LIIRN_APPS/liirn_landing | |
LIIRN_DASHBOARD=$LIIRN_APPS/liirn_assessment/liirn_dashboard | |
# Load SSH for LiiRN | |
ssh-add -D | |
ssh-add $SSH_FILE |
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> |