Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Renemari Padillo renesansz

🎯
Focusing
View GitHub Profile
@renesansz
renesansz / System Design.md
Created Dec 9, 2020 — forked from vasanthk/System Design.md
System Design Cheatsheet
View System Design.md

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@renesansz
renesansz / clamav-mac.md
Created Oct 21, 2020 — forked from mendozao/clamav-mac.md
Get ClamAV running on Mac OS X (using Homebrew)
View clamav-mac.md

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd daemon, you'll need a copy of the ClamAV databases.

Inside /your/location/to/brew/etc/clamav, you'll see 2 files:

@renesansz
renesansz / bot.js
Created Apr 16, 2019
bot code block
View bot.js
client.on('message', msg => {
if (msg.content === 'ping') {
msg.reply('pong');
}
});
@renesansz
renesansz / bot.js
Last active Oct 20, 2020
discord greeter bot
View bot.js
// Run dotenv
require('dotenv').config();
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
View gist:7e91d4551b13ea3a70f0b8ba3b567053
# 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
@renesansz
renesansz / gist:44c1e54d46ccad93b8fe1c3cb45ee44c
Created Jul 6, 2018
JS Regex - Convert every first letter in a word to uppercase
View gist:44c1e54d46ccad93b8fe1c3cb45ee44c
var yourString = "davao city";
var result = yourString.replace(/(^|\s)[a-z]/gm, c => c.toUpperCase());
console.log(result); // Davao City
@renesansz
renesansz / bot.js
Created May 25, 2017
Greeter bot js
View bot.js
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
@renesansz
renesansz / .env
Last active Dec 3, 2020
Greeter bot .env
View .env
DISCORD_TOKEN=YOUR-BOT-TOKEN
View package.json
{
"name": "greeter-bot",
"version": "1.0.0",
"description": "My own Discord bot",
"main": "bot.js",
"author": "YOUR-NAME-HERE",
"dependencies": {}
}
@renesansz
renesansz / README.md
Created Mar 2, 2017 — forked from shokai/README.md
enable/disable VNC on Mac OSX (testing with OSX 10.9)
View README.md
% vnc start
% vnc stop

termianl