Skip to content

Instantly share code, notes, and snippets.

@incraigulous
incraigulous / gist:d73df2a9ed2c2f143ec2
Created December 10, 2014 18:14
Find a yum package
yum search php | grep ssh
sudo su jonb
git reset --hard origin/master
(or whatever branch)
ec2-describe-instances | grep -b1 vpc-jmeter | grep PRIVATEIPADDRESS | cut -f4 | tr "\\n" ","; echo
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
@incraigulous
incraigulous / gist:8938671
Created February 11, 2014 16:42
Git Reset
git reset --hard origin/master
git push --force
@incraigulous
incraigulous / gist:8938631
Created February 11, 2014 16:41
Revert a Commit
git revert --no-commit <commit ID>
@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 / 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 / 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.sh
Created November 11, 2013 15:17
Show Timeline
git log --oneline --graph --all