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 / ping8.ps1
Created July 17, 2014 14:06
PowerShell script to ping 8.8.8.8 for ten seconds
#PowerShell script to ping 8.8.8.8 for ten seconds
function ping8() {
ping 8.8.8.8
Start-Sleep -s 10
Exit
}
ping8
@AJ-Acevedo
AJ-Acevedo / github.php
Created October 26, 2014 23:39
GitHub Web Hook
<?php
`git pull origin master`;
?>
@AJ-Acevedo
AJ-Acevedo / MAC2MAC
Last active August 29, 2015 14:18
Convert a Cisco MAC address to a properly formatted MAC address
cat MAC.csv | sed -e 's/[0-9a-fA-F]\{2\}/&:/g;s/.$//' >> REAL-MAC.csv
@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