Skip to content

Instantly share code, notes, and snippets.

View michaeljymsgutierrez's full-sized avatar
:octocat:
I'm just a developer for fun ⌨️

Chael Gutierrez michaeljymsgutierrez

:octocat:
I'm just a developer for fun ⌨️
View GitHub Profile
@michaeljymsgutierrez
michaeljymsgutierrez / express2https.txt
Last active March 31, 2018 13:49
Express to Https
Exec in terminal
sudo certbot --authenticator webroot --webroot-path <path-to-webroot> --installer apache -d <your-domain>
sudo certbot certonly --webroot --webroot-path= <path-to-webroot> -d <your-domain>
var https = require('https');
var sslOptions = {
key: fs.readFileSync('key.pem'),
cert: fs.readFileSync('cert.pem'),
};
https.createServer(sslOptions, app).listen(3000);
@michaeljymsgutierrez
michaeljymsgutierrez / index.html
Last active January 13, 2018 02:37
Site Maintenance
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #fff; background-color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #d3d3d3; text-decoration: none; }
</style>
@michaeljymsgutierrez
michaeljymsgutierrez / gulpfile.js
Created July 30, 2018 00:29
Set of gulp useful tasks
var gulp = require('gulp');
var gutil = require('gulp-util');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var sh = require('shelljs');
var pump = require('pump');
var uglify = require('gulp-uglify');
var webserver = require('gulp-webserver');
https://drive.google.com/open?id=0ByrfnAdEiGXpMndIV3BlRkxJWG8
@michaeljymsgutierrez
michaeljymsgutierrez / attendance.patch
Last active March 23, 2019 00:52
A super patch for my attendance
diff --git a/services/endpoints/attendance.js b/services/endpoints/attendance.js
index f5f5222..0f46fff 100644
--- a/services/endpoints/attendance.js
+++ b/services/endpoints/attendance.js
@@ -18,6 +18,112 @@ app.post("/api/attendance/import", (req, res) => {
let parse_line = string_data.replace(/(?:\r\n|\r|\n)/g, "<br/>");
let split_line = parse_line.split("<br/>");
split_line.splice(0, 1);
+ /**
+ * CG Patch Starts Here
@michaeljymsgutierrez
michaeljymsgutierrez / .bashrc
Created November 18, 2018 11:15
Personal Bash Config
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
{
"data": [{
"type": "users",
"id": "1",
"attributes": {
"name": "John"
}
},{
"type": "users",
"id": "2",
@michaeljymsgutierrez
michaeljymsgutierrez / settings.json
Created May 17, 2019 04:43
Sublime Text 3 - Settings
{
"color_scheme": "Packages/Monokai++/themes/Monokai++.tmTheme",
"detect_indentation": false,
"font_size": 12,
"highlight_modified_tabs": true,
"hot_exit": false,
"ignored_packages":
[
"Vintage"
],
@michaeljymsgutierrez
michaeljymsgutierrez / settings.json
Created May 29, 2019 07:43
VS Code Settings.json
{
"editor.fontSize": 12,
"editor.minimap.enabled": false,
"editor.detectIndentation": false,
"workbench.sideBar.location": "right",
"files.associations": {
"*.inc": "php",
"*.vue": "html",
"*.cgf": "shellscript"
},
@michaeljymsgutierrez
michaeljymsgutierrez / git_globally_ignore_files.txt
Created June 10, 2019 02:51
Command for globally ignoring files
cd ~
touch .gitignore_global
git config --global core.excludesfile ~/.gitignore_global