This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| javascript:(function(){var l=window.location,q="?flush=1";l+="";if(-1!==l.indexOf("?")){q="&flush=1";if(-1!==l.indexOf("flush=1")){q="";}}window.location+=q;})(); |
| git log --pretty=format: --name-only --since="2 days ago" | sort | uniq |
| img { -ms-interpolation-mode: bicubic; } |
| <?php | |
| // accepts a DateTime object which is now by default | |
| // and returns a DateTime object x working days from now | |
| // where x defaults to 1 | |
| function get_next_working_day($date = new DateTime, $no_of_days = 1) { | |
| // add the number of days passed but skip weekends | |
| for ($i = 0; $i < $no_of_days; $i++) { | |
| do { |
| <div id="scrollee" style="height:75%;" > | |
| <object id="object" height="90%" width="100%" type="text/html" data="http://en.wikipedia.org/"></object> | |
| </div> | |
| <a id="change-link" href="http://yahoo.com">link</a> | |
| <script type="text/javascript"> | |
| window.onload = function() { | |
| var el = document.getElementById("change-link"); | |
| el.onclick = function() { | |
| var target = this.getAttribute("href"); | |
| var el = document.getElementById("object"); |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| <?php | |
| /* | |
| By Marco Arment <[email protected]>. | |
| This code is released in the public domain. | |
| THERE IS ABSOLUTELY NO WARRANTY. | |
| Usage example: | |
| // In a registration or password-change form: |
| <?php | |
| // | |
| // So that servers can understand Daft Punk's song 'Harder, Better, Faster, Stronger', | |
| // that is, if the server in question has PHP installed.. | |
| // | |
| for($k=0; $k<16; $k++) | |
| { | |
| for($j=0; $j<4; $j++) |
| // this assumes an existing html tag containing the upper limit | |
| // of the word count, with an id of #word-count- + the id of the tinymce instance | |
| // e.g. <p>Words left: <span id="word-count-textarea-1">200</span></p> | |
| // add as a parameter to the tinyMCE.init({}); function | |
| setup: function(ed) { | |
| var text = ''; | |
| var span = document.getElementById('word-count-' + ed.id); | |
| if(span) { | |
| var wordlimit = span.innerHTML; |