Skip to content

Instantly share code, notes, and snippets.

View nickdenardis's full-sized avatar

Nick DeNardis nickdenardis

View GitHub Profile
@nickdenardis
nickdenardis / laravel4-force-ssl-filter.php
Created October 6, 2013 18:23
Laravel force SSL on all requests
<?php
Route::filter('force.ssl', function()
{
if( ! Request::secure())
{
return Redirect::secure(Request::getRequestUri());
}
});
@nickdenardis
nickdenardis / Preferences.json
Created September 16, 2013 11:16
SublimeText Settings
{
"bold_folder_labels": true,
"draw_minimap_border": true,
"draw_white_space": "all",
"font_face": "monaco",
"font_size": 14,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
@nickdenardis
nickdenardis / laravel-tips.markdown
Last active December 5, 2017 19:21
Tips on using Laravel

Resources

https://github.com/eightygrit/deploy-laravel/blob/master/deploy-laravel.z.sh
https://github.com/onigoetz/deployer
https://gist.github.com/purwandi/4110547
https://gist.github.com/chipotle/5506641

Add Sublime Text 2 to the CLI

sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/bin/subl

Use MAMP PHP CLI

@nickdenardis
nickdenardis / gist:4564366
Last active December 11, 2015 07:09
Foundation Resources
Menu button
http://codepen.io/chriscoyier/pen/fzsqm
Change menu borders
.nav-bar li, .nav-bar li a, .nav-bar > li:last-child {
border: none;
box-shadow: none;
}
@nickdenardis
nickdenardis / waynestate-footer-v2.html
Last active December 9, 2015 22:18
Non-responsive 960px wide Wayne State University footer HTML
@nickdenardis
nickdenardis / waynestate-header-v2.html
Created December 19, 2012 13:16
Non-responsive 960px wide Wayne State University header HTML
<div id="wsu-header">
<div class="c">
<ul class="skip">
<li><a href="#content">Skip to Content</a></li>
<li><a href="#menu">Skip to Navigation</a></li>
</ul>
<h1><a href="http://wayne.edu/"><img src="//wayne.edu/global/images/wsu-wayne-state-university.gif" alt="Wayne State University" width="344" height="33" /></a></h1>
<h2><a href="http://wayne.edu/aimhigher/"><img src="//wayne.edu/global/images/wsu-aim-higher.gif" alt="Aim Higher" width="85" height="13" /></a></h2>
<div id="tab">
<ul>
@nickdenardis
nickdenardis / waynestate-global-v2.css
Created December 19, 2012 12:36
Non-responsive 960px wide Wayne State University header and footer CSS
@media all {
body {
background-color: #fff;
color: #000;
font-family: Arial,Helvetica,sans-serif;
font-size: 100%;
margin: 0;
padding: 0;
}
a {
@nickdenardis
nickdenardis / gist:4230300
Last active October 13, 2015 17:28
Useful git commands
http://learn.github.com/p/branching.html
https://github.com/Kunena/Kunena-2.0/wiki/Create-a-new-branch-with-git-and-manage-branches
Renaming a heroku app
$ heroku apps:rename newname --app oldname
http://newname.heroku.com/ | [email protected]:newname.git
@nickdenardis
nickdenardis / gist:4200060
Last active October 13, 2015 13:07
Useful Ruby Commands
books.valu­es.each { |rate­| ratin­gs[rate] += 1 }
class BlogEntry
def initialize( title, mood, fulltext )
@time = Time.now
@title, @mood, @fulltext = title, mood, fulltext
end
end
---------------
@nickdenardis
nickdenardis / gist:4191614
Created December 2, 2012 23:44
Ruby ERB examples
Loops:
<ul>
<% for task in @tasks %>
<li id="task_<%= task.id %>"><%= task.task %>
| <%= link_to 'Edit', edit_task_path(task) %>
| <%= link_to 'Delete', task, :method => 'delete' %>
</li>
<% end %>
</ul>