Skip to content

Instantly share code, notes, and snippets.

View fpigeonjr's full-sized avatar

Frank Pigeon Jr. fpigeonjr

View GitHub Profile
@fpigeonjr
fpigeonjr / upload.php
Last active January 17, 2016 21:50
attempt to upload csv
//move uploaded files to the upload directory
if (count($_FILES) > 0 && $_FILES['file1']['error'] == 0) {
if ($_FILES['file1']['type'] == 'text/csv'){
$upload_dir = '/vagrant/sites/codeup.dev/public/uploads/';
// Grab the filename from the uploaded file by using basename
$filename = basename($_FILES['file1']['name']);
// Create the saved filename using the file's original name and our upload directory
$saved_filename = $upload_dir . $filename;
// Move the file from the temp location to our uploads directory
@fpigeonjr
fpigeonjr / gist:1ebca053be4eee1c67ea
Created July 12, 2014 06:57
codeup site config

Database Setup (Once)

  • Update mysql script with user: codeup
  • Run mysql user create script (codeup): ansible-playbook ansible/mysql-user-db.yml -l digital_ocean -e "mysql_admin=true"
  • Connect to server via SequelPro.

New Site Setup (For each new site)

  • Update mysql script to add codeup user.
  • Run site create script: ansible-playbook ansible/site-create.yml -l digital_ocean -e "domain=myblog.com" --ask-sudo-pass
@fpigeonjr
fpigeonjr / gist:19cfd60ac2a9ee1ee26e
Created July 20, 2014 06:23
Team Collaboration using GitHub-BenB

Ben (Git Master)

  • composer create-project laravel/laravel [project domain]
  • ansible-playbook ansible/site-create.yml -e "domain=[project domain]" -l vagrant
  • subl /etc/hosts
  • Create Repo on GitHub
  • git init
  • git remote add origin [git url]
  • git push -u origin master
  • Grant Access to Teammates
@fpigeonjr
fpigeonjr / start.php
Last active January 17, 2016 21:48
bootstrap/start.php
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Laravel takes a dead simple approach to your application environments
| so you can just specify a machine name for the host that matches a
| given environment, then we will automatically detect it for you.
|
*/
@fpigeonjr
fpigeonjr / reset.css
Last active August 29, 2015 14:16
common resets
.cf {
zoom: 1;
&:after {
clear: both;
}
&:before, &:after {
content: "";
display: table;
}
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="cloud"
# Uncomment the following line to use case-sensitive completion.
@fpigeonjr
fpigeonjr / sublime
Last active January 17, 2016 21:47
sublime preferences
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/SublimeLinter/Facebook (SL).tmTheme",
"font_face": "Fira Code",
"font_options":
[
"gray_antialias"
],
"font_size": 15,
"indent_guide_options":
@fpigeonjr
fpigeonjr / Create New Page in APT.md
Last active January 13, 2016 17:17
create a new public site

#Create a New Page in the Army Publishing Tool

  1. Create a new page at the APT
  2. Name the page something unique and follows the convention. ie.Organization_Page, Borden_Ebooks
  3. Next Validate the page by clicking and dragging from "Requested Page" to "Drag Here to Approve"
  4. On the right panel, move page under organizational unit.
  5. On the right panel, move it to "Drag here to enable"
  6. In the web page panel, copy the GUID from the new page located at the bottom of the list.
  7. Find the default page that you will save as the name of the new url. The default page is named default_public.aspx. If you wanted a page called 'ebooks', rename to ebooks.aspx
  8. You will paste the GUID you copied in step 6 in the following methods. Bind Grid and GridView1_RowDataBound.
  9. Email Ft. Detrick the new file and ask for them to upload to staging and production servers.
@fpigeonjr
fpigeonjr / .gitignore
Created January 17, 2016 21:59
Common gitignore for Laravel on OSX
# Created by https://www.gitignore.io/api/osx,laravel,composer,sass,elixir,sublimetext,phpstorm
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
@fpigeonjr
fpigeonjr / playbook.html
Last active June 2, 2016 19:22
Playbook backup
<img class="" src="https://hrcoe.amedd.army.mil/Playbook/images/org-chart_top.jpg" alt="orgchart" usemap="#org-chart" />
<map name="org-chart">
<area data-name="cg" shape="rect" coords="166,63,229,103" href="#" data-toggle="modal" data-target="#cg">
<!-- Modal cg -->
<div role=dialog tabindex=-1 id="cg" class="modal fade" aria-labelledby="cg-lbl">
<div role="document" class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button aria-label="Close" class="close" data-dismiss="modal"><span aria-hidden=true>×</span></button>