This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Softdelete extends HealthieModel | |
{ | |
protected function query() | |
{ | |
return new SoftDeleteQuery($this); | |
} | |
public function delete() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( ! file_exists( __DIR__.'/vendor/autoload.php' ) ) | |
{ | |
echo "First usage detected, installing composer from getcomposer.org\n"; | |
passthru("php -r \"eval('?>'.file_get_contents('https://getcomposer.org/installer'));\""); | |
echo passthru("php composer.phar install"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start_game = -> | |
canvas = document.getElementById "canvas" | |
context = canvas.getContext "2d" | |
blockHeight = canvas.height / 10 | |
blockWidth = canvas.width / 10 | |
draw_cell = (x, y, alive) -> | |
x = x * blockWidth | |
y = y * blockHeight | |
if alive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Main extends App { | |
val stream = Source.fromURL("http://www.yahoo.ca") | |
val lines = stream.getLines() | |
stream.getLines().foreach(println) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Main extends App { | |
val stream = Source.fromURL("http://www.yahoo.ca") | |
val document = Jsoup.parse(stream.getLines().mkString) | |
val title = document.getElementsByTag("title") | |
println(title) | |
} | |
// <title>Yahoo! Canada</title> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Set the font for gvim | |
if has('gui_running') | |
" Don't show scroll bars in the GUI | |
set guioptions-=L | |
set guioptions-=r | |
set guioptions-=m | |
set guioptions-=T | |
" Set colorscheme for gvim | |
" colorscheme zen-and-art | |
colorscheme Tomorrow-Night |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var drugList = new App.DrugList({}); | |
drugList.url = $('#druglist_url').val(); | |
drugList.fetch({ | |
success: function(collection) { | |
App.list.show(new DrugListView({ collection: collection })); | |
} | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onRender: function() { | |
this.$el.find('#units').val(this.model.get('units')); | |
this.$el.find('#type').val(this.model.get('type')); | |
this.$el.find('.datepicker').datepicker(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ healthie git:(site/pcs) ✗ git add . | |
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal', | |
whose behaviour will change in Git 2.0 with respect to paths you removed. | |
Paths like 'application/migrations/2013_05_21_171759_add_missing_fields_to_prescriptions.php' that are | |
removed from your working tree are ignored with this version of Git. | |
* 'git add --ignore-removal <pathspec>', which is the current default, | |
ignores paths you removed from your working tree. | |
* 'git add --all <pathspec>' will let you also record the removals. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::secure('GET', 'patient/(:num)/prescriptions/(:num)/druglist', | |
array('as' => 'druglist-index', 'uses' => 'patient.prescriptions.druglist@index')); | |
Route::secure('POST', 'patient/(:num)/prescriptions/(:num)/druglist', | |
array('as' => 'druglist-create', 'uses' => 'patient.prescriptions.druglist@create')); | |
Route::secure('PUT', 'patient/(:num)/prescriptions/(:num)/druglist/(:num)', | |
array('as' => 'druglist-update', 'uses' => 'patient.prescriptions.druglist@update')); |
OlderNewer