The particles/plankton swimming around in the background of the aquatilis website:
Forked from Justin Windle's Pen Gravitational Field.
A Pen by Tim Holman on CodePen.
| #search for bg images at stylesheets | |
| url\(\/assets\/([a-z \/ \. _]+)\) | |
| #replace it with image-url rails function | |
| image-url('$1') |
| // reference http://graphicdesign.stackexchange.com/a/26044/18833 | |
| function exportFileToPNG(dest, artBoardIndex) | |
| { | |
| var exportOptions = new ExportOptionsPNG24(); // or ExportOptionsPNG24 | |
| var type = ExportType.PNG24; // or ExportType.PNG24 | |
| var file = new File(dest + ".png"); | |
| exportOptions.artBoardClipping = true; | |
| exportOptions.antiAliasing = true; |
The particles/plankton swimming around in the background of the aquatilis website:
Forked from Justin Windle's Pen Gravitational Field.
A Pen by Tim Holman on CodePen.
| // Run from console on developers tools (chrome dev tools) | |
| // Go to friends page from your profile and open console F12 or alt+cmd+I | |
| // Get all links from action section, this will fetch links for remove from friends and other too. | |
| // FIXME: add filter to show only remove from friends links | |
| var l = document.querySelectorAll('.friends_act'); | |
| // Function link takes list of links (dom elements) as argument and iterate through each of them and set them style properties | |
| // in my case position: fixed; top: 20px; right: 40px; |
| console.log($LINE$); | |
| // LINE = lineNumber() |
| div#home-store-info { | |
| @extend .hidden-xs; | |
| @extend .col-sm-12; | |
| @extend .col-md-12; | |
| margin-bottom: 20px; | |
| div.store-info-block { | |
| background-color: rgba(255, 255, 255, 0.4); | |
| color: #1b6a8e; | |
| @extend .row; |
| javascript: | |
| (function (){ | |
| var iframe_wrap = document.getElementsByClassName('b-iframe-aplayer')[0], | |
| _i = iframe_wrap.getElementsByTagName('iframe')[0], | |
| player = _i.contentDocument.getElementById('player'), | |
| teasers = _i.contentDocument.getElementsByClassName('b-aplayer-teasers')[0], | |
| duration = player.duration; | |
| teasers.style.visibility = 'hidden'; | |
| player.currentTime = duration; |
| def click_on_day_at_datepicker(date) | |
| d = Date.parse(date) | |
| month = d.strftime('%b') | |
| day = d.day | |
| # XPath select Month switcher | |
| xpath_month_switcher_selector = '//div[contains(@class, "datepicker-days") and not(contains(@style,"display:none"))]//th[contains(@class, "datepicker-switch")]' | |
| find(:xpath, xpath_month_switcher_selector).click | |
| # XPath select particular Month | |
| xpath_particular_month_selector = "//div[contains(@class, \"datepicker-months\") and not(contains(@style,\"display:none\"))]//*[text() = \"#{month}\"]" | |
| find(:xpath, xpath_particular_month_selector).click |
| def set_ajax_counter(global_var) | |
| page.execute_script <<-SCRIPT | |
| window["#{global_var}"] = 0; | |
| $(document).on("ajaxSend", function(){ | |
| window["#{global_var}"]++; | |
| console.log('increment ajax counter window["#{global_var}"] = ' + window["#{global_var}"]); | |
| }); | |
| SCRIPT | |
| end |
| javascript: | |
| var fr_pat = /#gh-(\S+): /g; | |
| var fr_str = ''; | |
| $('.report tr').each(function(i,el) { | |
| $td = $(el).find('.text_wrap').eq(3);fr_str += $td.text().replace(fr_pat, '- ') + '\n'; | |
| }); | |
| console.log(fr_str); |