Skip to content

Instantly share code, notes, and snippets.

@mosleymos
mosleymos / setup-mysql.sh
Created January 31, 2022 08:45 — forked from sheikhwaqas/setup-mysql.sh
Install MySQL Server on Ubuntu (Non-Interactive Installation)
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
@mosleymos
mosleymos / mysql linux install.sh
Created January 31, 2022 08:45 — forked from NapoleonWils0n/mysql linux install.sh
linux: mysql install and set up
#!/bin/sh
# =======================
# = MySQL linux install =
# =======================
# To begin with, a simple MySQL install:
@mosleymos
mosleymos / install-ruby.yml
Created January 27, 2022 15:53 — forked from misha-slyusarev/install-ruby.yml
Ansible script to install Ruby on a remote machine
---
- name: Install Ruby 2.3.3
hosts: all
remote_user: ubuntu
become: yes
tasks:
- name: Check if Ruby is installed
command: which ruby
register: ruby_check
ignore_errors: yes
@mosleymos
mosleymos / init.vim
Created November 19, 2019 13:26 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@mosleymos
mosleymos / Makefile
Created September 27, 2019 12:39 — forked from jakogut/Makefile
Boilerplate C Project Makefile
CC = gcc
LD = gcc
CFLAGS = -Wall -pipe
OFLAGS = -c -I/usr/include
LFLAGS = $(CFLAGS) -L/usr/lib/
SOURCES = $(wildcard *.c)
OBJECTS = $(SOURCES:.c=.o)
@mosleymos
mosleymos / Simplistic_JavaScript_Router.js
Created July 25, 2018 17:44 — forked from mckabue/simplex-router.ts
This is an ASP.NET MVC CORE Router in JavaScript for Single Page Application (SPA) to allow consistency. The router is easier to extend as one just adds Tokens, simple to use as its very minimalistic and straight forward, and runs faster as it compiles the routes on initilazation and uses the compiled routes to match a string URL. https://jsfidd…
//https://stackoverflow.com/a/14033636
//http://medialize.github.io/URI.js/
;; // prevents code from breaking if the previous scrips is not syntactically correct
(function (name, definition) {
if (typeof module != 'undefined') module.exports = definition();
else if (typeof define == 'function' && typeof define.amd == 'object') define(definition);
else this[name] = definition();
}('ROUTER', function () {
var utils = {
quoteRegExp: function (string) {
@mosleymos
mosleymos / gist:1569161a8cdb6d07f428353a451a8801
Created March 25, 2018 16:10 — forked from shovon/gist:5685073d03829f3b63d0
Haskell-style monads in JavaScript (ES6).
'use strict';
class Monad {
constructor(a) { this._value = a; }
'>>='(f) { return f(this.value()); }
static create(a) { return new Monad(a); }
value() { return this._value; }
}
var val = Monad.create(10) ['>>=']
@mosleymos
mosleymos / progressBar.js
Created March 25, 2018 12:54 — forked from KaKi87/progressBar.js
One element progress bar
/*
One element progress bar
by KaKi87
22.03.18
*/
/*
Get browser prefix (for CSS)
https://stackoverflow.com/questions/8889014/setting-vendor-prefixed-css-using-javascript
https://davidwalsh.name/vendor-prefix
@mosleymos
mosleymos / .vimrc
Last active March 16, 2018 15:23
vimrc a reetudier
""" Configuration vim
""" Leader to Ctrl + s
let mapleader=' '
syntax enable
""" Local language to us
""" setlocal spell spelllang=en_us
set number