Skip to content

Instantly share code, notes, and snippets.

View gwing33's full-sized avatar

Gerald Leenerts gwing33

  • Follow Up Boss
  • Scottsdale, AZ
View GitHub Profile
<ul id="message-popdown">
<% flash.each_pair do |key, value| %>
<li class='<%= key %>'><%= value %></li>
<% end %>
</ul>
@gwing33
gwing33 / parallapser.js
Created January 20, 2011 18:28
Parallapser (v1.0) - on the targeted object, you can define how much it moves on scroll by percent. It's basically a Parallax engine.
(function( $ ){
var methods = {
init : function( options ) {
return this.each(function(){
var $this = $(this), data;
if ( ! $this.data('parallapse') ) {
@gwing33
gwing33 / Uploadosity.js
Created March 25, 2011 22:58
Drag and Drop Multiple Files from Desktop/Browser. Select Multiple files from File Input. Submit to a URL of your choosing with the params you need. Work in Progress. Uses Underscore for easy templates.
/*
* Uploadosity will take a container and turn it into a drag and drop BEAST.
* Give it a URL to send the data, any extra params.
* If you have an file input box you can specify that to add it to the list.
*/
(function( $ ){
var methods = {
uid: 0,
init : function( options ) {
var defaults = {
@gwing33
gwing33 / Crap .NET
Created July 5, 2011 21:06
So...because I couldn't create a form on a asp.net page I ended up creating on in the master file outside the usercontrol form then using javascript to write the form...crap on so many levels.
$('#adword_save').click(function() {
var el = $('#submit_form');
var form_html = '<input type="hidden" id="filename" name="filename" value="adwords.csv" />' +
'<input type="hidden" id="content" name="content" value="' + $('#copy_text').val() + '" />';
el.attr({method: 'post', action: '/some/api/location.aspx'});
el.html(form_html);
el.submit();
});
@gwing33
gwing33 / fibonacci_sequence.js
Created March 28, 2012 05:50
Wanted to find out the degrees within the fibonacci sequence...
var fibonacci_sequence = [0,1],
degrees = [],
dup_degrees = [];
var fibonacci_total = 0,
prev_num = 0,
cur_num = 1;
var degree,
has_degree;
@gwing33
gwing33 / Compass Shortcuts...
Created April 26, 2012 15:25
.bash_profile
# Compass shortcuts
alias wat='compass watch'
@gwing33
gwing33 / modal_window.html
Created July 5, 2012 17:59
found the root javascript somewhere, not sure...but I've modified it a lot...
<div id="some_id" class="window">
<!-- Some Html here... -->
<a href="#" class="close">Cancel</a>
</div>
<div id="mask"></div>

Wall Mounted Desk Parts List

  • Two 96 7/8" x 25 5/8" Logan Counter Tops
  • Eight 8" Corner Braces
  • One 3/4" Plain Steel Square Tube
  • Eight 1/4" x 5 1/2" Hex Bolts
  • Eight 1/4" Fender Washers
  • Eight Flush Screw in Bolts? (Couldn't find on HomeDepot website, but they are in the specialty hardware section…)
  • Lots of screws to fit the Corner Braces
  • 3 Packs of round Magnets
@gwing33
gwing33 / bootstrap_btn_color_mixin.sass
Created April 9, 2013 18:27
Sass + Compass Twitter bootstrap custom button color mixin
=btn_color($primary)
$secondary: adjust-saturation(adjust-lightness($primary, 9), 37)
$tertiary: adjust-saturation(adjust-lightness($primary, 22), 5)
color: #ffffff
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25)
background-color: $primary
*background-color: $tertiary
+background-image(linear-gradient(top, $secondary, $primary))
background-repeat: repeat-x
@gwing33
gwing33 / ReverseSpeeds.js
Last active January 1, 2016 00:09
Testing which Reverse String methods are faster... run it here: http://jsperf.com/reverse-speeds/2
// Run tests
function run_test(func) {
var j, s = 'asdfasdfasdf', name = func.name;
console.time(name);
for(j = 0; j <= 10000; j++) {
func(s);
}
console.timeEnd(name);
}