Skip to content

Instantly share code, notes, and snippets.

View AJ-Acevedo's full-sized avatar
🤓
Studying

AJ Acevedo AJ-Acevedo

🤓
Studying
View GitHub Profile
@AJ-Acevedo
AJ-Acevedo / vimrc
Created November 29, 2012 19:22
VIM configuration
" Custom VIM Settings
" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8
" Turn Syntax Highliting on
syntax on
" Set the Default Color Scheme/Theme
@AJ-Acevedo
AJ-Acevedo / fibonacci.php
Created December 11, 2012 17:38
Fibonacci Sequence using PHP
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<title>Fibonacci Sequence using PHP</title>
</head>
<body>
<div align=center>
<h1>Fibonacci Sequence using PHP</h1>
@AJ-Acevedo
AJ-Acevedo / sqlite3_syntax.txt
Last active October 13, 2015 22:28
Basic Syntax for sqlite3
Basic Syntax for sqlite3
# Navigate to the directory where the sqlite database files are located
$ cd /workingDIR
# Initiate a connection with the database
$ sqlite3 databasename.sqlite3
# Show tables
> .tables
@AJ-Acevedo
AJ-Acevedo / db_backup.rb
Created February 27, 2013 20:56
MySQL Database Backup Script
#!/usr/bin/env ruby
# AJ Acevedo | ajacevedo.com
# This script will backup and compress a MySQL database using mysqldump and gzip
# Simply specify the database name, username, and password at the command-line when excucuting the script.
# Usage Syntax:
# $ db_backup.rb database_name username password
database = ARGV.shift
username = ARGV.shift
@AJ-Acevedo
AJ-Acevedo / simple.html
Created March 13, 2013 21:41
Simple HTML5 file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> <!-- Insert Title Here --> </title>
</head>
<body>
<header>
<nav>
<!-- Insert Navigation Bar Here -->
@AJ-Acevedo
AJ-Acevedo / test_chromatic.rb
Last active December 15, 2015 07:19
Chromatic gem
# This works
$ gem install colorize
$ ruby -rubygems -e 'require "colorize"; puts "This is a blinking blue on red string".blue.on_red.blink'
# this is broken
gem install chromatic
$ ruby -rubygems -e 'require "chromatic"; puts "This is a blinking blue on red string".blue.on_red.blink'
@AJ-Acevedo
AJ-Acevedo / k4-hotfix.sh
Last active December 15, 2015 20:40
Bash script to add a directory to the CS6 installation which K4 depends on for non-admin users.
#!/usr/bin/env bash
# This script adds an empty Macintosh HD directory to the CS6 installation which K4 depends on for non-admin users.
# This script must be run with sudo from Terminal or deployed as an Administrator with Remote Desktop
# ie:
# $ sudo ./k4-hotfix.sh
# If you are unable to execute this file make sure it has executable permissions.
# $ chmod 777 k4-hotfix.sh
mkdir -p /Applications/Adobe\ InDesign\ CS6/Adobe\ InDesign\ CS6.app/Contents/MacOS/Macintosh\ HD
@AJ-Acevedo
AJ-Acevedo / host.rb
Last active December 23, 2018 10:09
Ruby code snippets to determine host OS and currently running ruby version
#!/usr/bin/env ruby
# Ruby code snippets to determine host OS and currently running ruby version
##############################################################
# RbConfig to determine host OS and exit if not mac or linux #
##############################################################
require 'rbconfig'
@os = RbConfig::CONFIG['host_os']
@AJ-Acevedo
AJ-Acevedo / rvm-install.md
Last active November 1, 2016 14:13
Installing RVM, Ruby, & Rails
@AJ-Acevedo
AJ-Acevedo / passenger-install.md
Last active December 17, 2015 09:29
Installing Passenger On Mac OS 10.8.3 with SSL

Installing Phusion Passenger on Mac OS 10.8.3 with SSL

$ brew install pcre
$ gem install passenger
$ passenger-install-nginx-module
https://www.phusionpassenger.com/download

TODO:

  • create a deploy user and group