Skip to content

Instantly share code, notes, and snippets.

Avatar

AJ Acevedo AJ-Acevedo

View GitHub Profile
@AJ-Acevedo
AJ-Acevedo / ping8.ps1
Created Jul 17, 2014
PowerShell script to ping 8.8.8.8 for ten seconds
View ping8.ps1
#PowerShell script to ping 8.8.8.8 for ten seconds
function ping8() {
ping 8.8.8.8
Start-Sleep -s 10
Exit
}
ping8
View github.php
<?php
`git pull origin master`;
?>
@AJ-Acevedo
AJ-Acevedo / MAC2MAC
Last active Aug 29, 2015
Convert a Cisco MAC address to a properly formatted MAC address
View MAC2MAC
cat MAC.csv | sed -e 's/[0-9a-fA-F]\{2\}/&:/g;s/.$//' >> REAL-MAC.csv
@AJ-Acevedo
AJ-Acevedo / vimrc
Created Nov 29, 2012
VIM configuration
View vimrc
" 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 Dec 11, 2012
Fibonacci Sequence using PHP
View fibonacci.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 Oct 13, 2015
Basic Syntax for sqlite3
View sqlite3_syntax.txt
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 Feb 27, 2013
MySQL Database Backup Script
View db_backup.rb
#!/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 Mar 13, 2013
Simple HTML5 file
View simple.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> <!-- Insert Title Here --> </title>
</head>
<body>
<header>
<nav>
<!-- Insert Navigation Bar Here -->
View test_chromatic.rb
# 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 Dec 15, 2015
Bash script to add a directory to the CS6 installation which K4 depends on for non-admin users.
View k4-hotfix.sh
#!/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
You can’t perform that action at this time.