Skip to content

Instantly share code, notes, and snippets.

@ziadoz
ziadoz / install.sh
Last active April 7, 2024 16:04
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@naasfu
naasfu / adidas-uk-login.py
Created December 17, 2016 07:40
Example Adidas UK Login
#!/usr/bin/env python
import requests
import re
import BeautifulSoup
email="destroyer@nike.com"
password="Destroyer3"
session=requests.Session()
tinymce.PluginManager.add('smartquotes', function(editor) {
function convert(e) {
rootNodes = editor.dom.select("body > *");
for (var i = 0; i < rootNodes.length; i++) {
var el = rootNodes[i];
var contentEditable = editor.dom.getAttrib(el, "contenteditable");
if (contentEditable !== "false") {
convertBlock(el);
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@jmac
jmac / to-the-melbourne-football-club.md
Last active August 29, 2015 13:57
MFC merchandise feedback

Hi all!

I've been giving you a fair bit of stick on Twitter recently about MFC merchandise (my handle is, ahem, @jmac). I mostly try and keep it light-hearted/civil, but every now and then I get a bit... ranty. And sweary. At the suggestion of the inimitable @demonblog, I decided to gather my thoughts and words from the gutter and try and give some more constructive criticism. If you're still reading at this point, thanks for indulging me.

You see—and I'm sure everyone who writes to you to complain says this—I love the Melbourne Football Club. I haven't been a member for as long as some, but I've followed the club since I was born. My Dad barracks for the Dees, and so do my two brothers and sister. My son Angus does now too, and with any luck so will his sister, Zara. Angus has been a member since he was born, and I'm hoping to sign 6 month-old Zara up this year too. My Dad is lucky enough to have seen the club win a Grand Final back in the day –

@toolmantim
toolmantim / Makefile
Last active December 5, 2022 23:14
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
@makenosound
makenosound / spacing-class.css.scss
Created May 3, 2013 02:03
Modified version of the `spacing-classes` pattern from Stitch. Allows you to specify additional units for output.
// Generate inline class names for your elements
//
// <div class="actions inset-vert-small-large">
// <button type="submit">Totes click me!</button>
// </div>
//
// Padding
// ---------------
// pad-{item} : pad-small (padding: 10px)
// pad-vert-{item}-{item + 1} : pad-vert-small-large (padding: 10px 0 40px 0)
@makenosound
makenosound / flexible-grid.scss
Last active December 14, 2015 11:38
A flexible grid structure using SASS and placeholder classes
// Configurables
$flexibleGridColumns: 24 !default;
$flexibleGridColumnWidth: 30px !default;
$flexibleGridGutterWidth: 18px !default;
// Full width of a row
$flexibleGridRowWidth: ($flexibleGridColumns * $flexibleGridColumnWidth) + ($flexibleGridGutterWidth * ($flexibleGridColumns - 1));
// The width of a column
$flexibleGridGridWidth: percentage($flexibleGridColumnWidth / $flexibleGridRowWidth);
@maxfenton
maxfenton / gist:3670929
Created September 8, 2012 00:34
Twitter stylebot
.content-main {
float: none ;
width: 100% ;
}
.dashboard {
float: none ;
width: 100% ;
}
@makenosound
makenosound / eleven40.scss
Created July 18, 2011 01:04
SASS plugin for Andy Taylor's 1140 grid
$eleven40-grid-width: 4.85% !default; // The width of a column
$eleven40-grid-margin: 3.8% !default; // The amount of margin between columns
@mixin eleven40-container {
padding-left: 20px;
padding-right: 20px;
}
@mixin eleven40-row {
margin: 0 auto;