Skip to content

Instantly share code, notes, and snippets.

View peter-mcconnell's full-sized avatar
🏴

Peter McConnell peter-mcconnell

🏴
View GitHub Profile
@peter-mcconnell
peter-mcconnell / doctrinemigrate.sh
Created January 14, 2014 16:22
Doctrine migrate
php app/console doctrine:migrations:migrate --dry-run
@peter-mcconnell
peter-mcconnell / loopcsv.php
Created January 14, 2014 16:30
PHP Loop csv file
<?php
$file = fopen('data.csv', 'r');
while ($row = fgetcsv($file)) {
}
@peter-mcconnell
peter-mcconnell / bucketpolicy.txt
Created January 15, 2014 12:44
S3 open bucket policy
{
"Version": "2008-10-17",
"Id": "Policy1377015142632",
"Statement": [
{
"Sid": "Stmt1377015001378",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
@peter-mcconnell
peter-mcconnell / repomigrate.sh
Created January 15, 2014 12:50
GIT Repo migrate
git clone --bare {repo}
cd {repo}/
git push --mirror {repo}
@peter-mcconnell
peter-mcconnell / gist:8489587
Created January 18, 2014 12:07
logitech m750 m705 pairing
sudo apt-get install git gcc
git clone https://git.lekensteyn.nl/ltunify.git
cd ltunify
make install-home
sudo ltunify pair
========
http://askubuntu.com/questions/113984/is-logitechs-unifying-receiver-supported
@peter-mcconnell
peter-mcconnell / portactivity.sh
Created February 4, 2014 12:31
Port activity
sudo lsof -i :80
@peter-mcconnell
peter-mcconnell / listgems.sh
Created February 4, 2014 16:19
Ruby list gems
gem query --local
@peter-mcconnell
peter-mcconnell / set-user-pwd.sql
Created February 5, 2014 14:50
MySQL change password
USE mysql;
SET PASSWORD FOR 'user-name-here'@'hostname-name-here' = PASSWORD('new-password-here');
@peter-mcconnell
peter-mcconnell / createuser.sql
Created February 5, 2014 14:55
MySQL create user
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
FLUSH PRIVILEGES;
@peter-mcconnell
peter-mcconnell / pwdpls.sh
Created February 13, 2014 11:06
ssh password only
# stop ssh attempting to loop through ssh keys and go straight to pwd prompt
ssh -o PubkeyAuthentication=no [email protected]