% 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
# 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
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
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
DISCORD_TOKEN=YOUR-BOT-TOKEN |
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
#!/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
#!/bin/bash | |
set -e | |
LOGFILE=/opt/dti-sordas/logs/gunicorn.log | |
LOGDIR=$(dirname $LOGFILE) | |
TIMEOUT=300 | |
NUM_WORKERS=1 | |
cd /opt/dti-sordas/dti-sordas | |
source ../env/bin/activate | |
test -d $LOGDIR || mkdir -p $LOGDIR | |
#export DJANGO_SETTINGS_MODULE="src.sordas.settings" |
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 | |
}; | |
/** |