git branch new-branch
git checkout new-branch
- [edit code]
git add --all
git commit 'add awesome stuff to thing'
- [repeat 2-3 until whenever]
git push origin master
...
<h4>Images</h4> | |
<ul> | |
<?php foreach($data->images as $image) { ?> | |
<li><img src="<?php echo CHtml::encode($image->url); ?>" alt="<?php echo CHtml::encode($image->description); ?>" /></li> | |
<?php } ?> | |
</ul> |
<?php | |
/* @var $this GalleryController | |
* @var $data ImageGallery | |
*/ | |
Yii::import('application.extensions.fancybox'); | |
?> | |
<div class="fancy-view"> |
<?php | |
public function getTmpUrl($posted_image) | |
{ | |
Yii::import('application.extensions.upload.Upload'); | |
// receive file from post | |
$Upload = new Upload( $posted_image ); | |
$Upload->jpeg_quality = 100; | |
$Upload->no_script = false; | |
$Upload->image_resize = true; |
<?php | |
class ImageForm | |
{ | |
public function setImage($posted_image) | |
{ | |
Yii::import('application.extensions.upload.Upload'); | |
$upload = new Upload($posted_image); | |
$upload->jpeg_quality = 100; | |
$upload->no_script = false; |
git branch new-branch
git checkout new-branch
git add --all
git commit 'add awesome stuff to thing'
git push origin master
...
int LED = 13; // the pin for the LED | |
int BUTTON = 7; // the input pin where the pushbutton is connected | |
int val = 0; // val will be used to store the state of the input pin | |
int delay_time = 1000; | |
void setup() { | |
pinMode(LED, OUTPUT); // tell Arduino LED is an output | |
pinMode(BUTTON, INPUT); // and BUTTON is an input | |
} |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
$script = <<SCRIPT | |
sudo rm -rf /var/www | |
sudo ln -fs /vagrant/project/directory /var/www | |
sudo mysqladmin -s -uroot -pvagrant create project_db --force | |
sudo mysql -s -uroot -pvagrant -e 'GRANT ALL PRIVILEGES ON project_db.* \ |
Every vagrant box starts out as a bare, minimal linux distribution. In our case, this was Ubuntu 12.04 LTS.
This page is a record of every command that was given to this base VM before it was repackaged as the lamp.box
that we use. I've also included the vagrant commands used to generate it.
taylorlapeyre: vagrant init precise32
taylorlapeyre: vagrant ssh
# All passwords: "vagrant"
#!/bin/bash | |
bootstrap_system() { | |
set_permissions | |
configure_ssh | |
install_vb_guest_additions | |
install_rbenv | |
install_ruby | |
sudo apt-get clean |
:PIXELFALL | |
0→Xmin:94→Xmax:–62→Ymin:0→Ymax | |
ClrDraw:AxesOff:FnOff | |
Text(0,23,"FALLING PIXEL | |
Text(20,23,"PROGRAMMED BY | |
Text(27,29,"TAYLOR LAPEYRE | |
Text(37,1,"Highest Score:192457 | |
Text(44,1,"By Allen Krake" | |
Text(55,41,"v3.0 | |
Pause |