Skip to content

Instantly share code, notes, and snippets.

@incraigulous
incraigulous / new_gist_file.mysql
Created November 11, 2013 15:15
Drop Foreign Key
alter table [name] drop foreign key [foreign key name];
@incraigulous
incraigulous / new_gist_file.mysql
Created November 11, 2013 15:15
Show Table Info
show create table [name];
@incraigulous
incraigulous / new_gist_file.sh
Created November 11, 2013 15:17
Show Timeline
git log --oneline --graph --all
@incraigulous
incraigulous / new_gist_file.php
Created November 11, 2013 15:22
Fieldgen Drop Down
$select_obj = $fieldgen->init_select($name, $label_text);
$select_obj->create_option($name, $value);
@incraigulous
incraigulous / new_gist_file
Created November 20, 2013 18:08
Mailchimp Reset
<style type="text/css">
/* /\/\/\/\/\/\/\/\/ RESET STYLES /\/\/\/\/\/\/\/\/ */
body{
margin:0;
padding:0;
}
img{
border:0 none;
height:auto;
@incraigulous
incraigulous / gist:8011636
Created December 17, 2013 20:02
.sql to .csv
// To file
mysql <database> < file.sql > export.csv
// Cat
mysql <database < file.sql
@incraigulous
incraigulous / gist:8938631
Created February 11, 2014 16:41
Revert a Commit
git revert --no-commit <commit ID>
@incraigulous
incraigulous / gist:8938671
Created February 11, 2014 16:42
Git Reset
git reset --hard origin/master
git push --force
go into repository
git remote add site_template [email protected]:other_repo
git pull other_repo
then you can do a merge from the other_repo branches into the repository branches
ec2-describe-instances | grep -b1 vpc-jmeter | grep PRIVATEIPADDRESS | cut -f4 | tr "\\n" ","; echo