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
| var str = "spam, spam and eggs, spam and chips, Ham Spam and Eggs, Eggs Eggs Spam and Spam"; | |
| function unique(a) { | |
| var tmp = {}; | |
| for (var i = 0; i < a.length; i++) | |
| tmp[a[i]] = true; | |
| var r = []; | |
| for (var k in tmp) | |
| r.push(k); | |
| return r; |
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
| // blade template - just html really | |
| @section('journal-carousel') | |
| <div class="container article-carousel"> | |
| <div class="row"> | |
| <div class="col-sm-12"> | |
| <div class="article-carousel__slider"> | |
| @for ($i = 0; $i < 3; $i++) | |
| <figure><img src="{{Theme::url('images/blonde'.$i.'.jpg')}}" alt="" class="img-responsive" /></figure> | |
| @endfor | |
| @for ($i = 0; $i < 3; $i++) |
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
| <style> | |
| .select-style { | |
| border: 1px solid #ccc; | |
| width: 120px; | |
| border-radius: 3px; | |
| overflow: hidden; | |
| background: #fafafa url("img/icon-select.png") no-repeat 90% 50%; | |
| } | |
| .select-style select { |
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 | |
| try { | |
| $pdo = new PDO('mysql:host=localhost;dbname=ijdb; | |
| charset=utf8', 'ijdbuser', 'mypassword'); | |
| $pdo->setAttribute(PDO::ATTR_ERRMODE, | |
| PDO::ERRMODE_EXCEPTION); | |
| $sql = ''; | |
| $result = $pdo->query($sql); | |
| while ($row = $result->fetch()) { |
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
| /* you forgot the 'alt' attribute */ | |
| img[alt=""], | |
| img:not([alt]) { | |
| border: 5px dashed #c00 | |
| } |
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
| /* | |
| @author: Gareth Hogan - @furryronin | |
| #@copyright: Copyright free | |
| #@version: 2.0.0 | |
| #@info: JS function refactor array for unique values | |
| #@dependencies: none | |
| #@license: http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License | |
| #@info: Author accepts no responsibility for the use of this code | |
| #@additional credits: GNU Terry Prachett | |
| */ |
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
| /* | |
| #@author: Gareth Hogan - @furryronin | |
| #@copyright: Copyright free | |
| #@version: 1.2.1 | |
| #@info: Smooth anchor scroll, can't remember where it came from originally but has been changed | |
| #@dependencies: Jquery 1.11+.* | |
| #@license: http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License | |
| #@info: Author accepts no responsibility for the use of this code | |
| #@additional credits: GNU Terry Prachett |
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
| /* | |
| @author: Gareth Hogan - @furryronin | |
| #@copyright: Copyright free | |
| #@version: 2.0 - added decodeURI | |
| #@info: JS Snippit to grab variable from a url with js | |
| #@dependencies: none | |
| #@license: http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License | |
| #@info: Author accepts no responsibility for the use of this code | |
| #@additional credits: GNU Terry Prachett | |
| */ |
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
| // Google Forms Slack Notification | |
| // Andy Chase <github.com/andychase> | |
| // License: CC0 1.0 Universal <creativecommons.org/publicdomain/zero/1.0> | |
| // Install 1: This code goes in ( tools > script editor... ) of your google docs form | |
| // Install 2: ( resources > current project triggers ) ( [onSubmit], [from Form], [On form submit] ) | |
| // Setup 1: Put your slack api url below | |
| var POST_URL = "https://hooks.slack.com/services/"; | |
| function onSubmit(e) { |
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 | |
| #@author: Gareth Hogan - @furryronin | |
| #@copyright: Copyright free | |
| #@version: Applied Styles Rev.2.0, Site Rev.3.1 | |
| #@info: Post to Slack chanel webhook from form | |
| #@dependencies: PHP5+ / CURL | |
| #@license: http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License | |
| #@info: Author accepts no responsibility for the use of this code | |
| #@additional credits: GNU Terry Prachett |
NewerOlder