Skip to content

Instantly share code, notes, and snippets.

@leekiernan
leekiernan / lee.zsh-theme
Last active July 24, 2023 11:05
lee.zsh-theme
function theme_precmd {
local TERMWIDTH=$(( COLUMNS - ${ZLE_RPROMPT_INDENT:-3} ))
# local TERMWIDTH=20
PR_FILLBAR=""
PR_PWDLEN=""
local promptsize=${#${(%):---(%D{%H:%M:%S})---()--}}
local pwdsize=${#${(%):-%~}}
from bs4 import BeautifulSoup
import asyncio
import aiohttp
import aiofiles
import csv
import os
import re
import time
from selenium import webdriver
from bs4 import BeautifulSoup
from selenium.webdriver.chrome.options import Options
CHROME_DRIVER_PATH = '/mnt/c/Users/leekiernan/AppData/Local/Google/chromedriver.exe'
# driver = webdriver.Chrome(CHROME_DRIVER_PATH)
# driver.get('http://www.google.com/xhtml');
# time.sleep(5)
# search_box = driver.find_element_by_name('q')
# 404: https://www.whsmith.co.uk/dept/toys-and-games-toys-model-railway-14x00010
# 200: https://www.whsmith.co.uk/dept/books-biography-and-true-stories-humour-02x02589
from bs4 import BeautifulSoup
import requests
import re
import csv
import sys
import os
@leekiernan
leekiernan / ios.lua
Last active March 9, 2018 15:50
Botr
--[[
p1 = 910x2065
p2 = 910x1560
p3 = 910x1055
p4 = 910x551
p5 = 910x46
]]
CREATETIME="2017-01-27 19:57:16";
@leekiernan
leekiernan / gist:c8cb76c9ff98f42caa8a
Created March 19, 2015 09:27
fallback background
.overlay {
position:absolute;
top:0; right:0; bottom:0; left:0;
background:transparent;
background-image: -svg(linear-gradient( 135deg, rgba(#ccc, 0.15) 0%, rgba(#ccc, 0.15) 50%, transparent 50%, transparent 100%) );
}
@leekiernan
leekiernan / gist:3f5873e78849a1b0eafe
Created November 26, 2014 10:19
gruntfile-formatting
// Generated on 2014-09-18 using generator-webapp 0.4.9
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
var Hook = {
hooks: [],
register: function ( name, callback ) {
if( 'undefined' == typeof( Hook.hooks[name] ) ) {
// Create empty array if first hook for name.
Hook.hooks[name] = []
}
Hook.hooks[name].push( callback )
@leekiernan
leekiernan / clubs_travel.rb
Created September 2, 2014 12:20
clubs_travel.rb
require 'google_directions'
clubs = {
chelsea: { latitude:51.4816, longitude:-0.191034, directions: {} },
swansea_city: { latitude:51.6428, longitude:-3.93473, directions: {} },
aston_villa: { latitude:52.5092, longitude:-1.88508, directions: {} },
manchester_city: { latitude:53.483, longitude:-2.20024, directions: {} },
liverpool: { latitude:53.4308, longitude:-2.96096, directions: {} },
tottenham_hotspur: { latitude:51.6033, longitude:-0.065684, directions: {} },
arsenal: { latitude:51.5549, longitude:-0.108436, directions: {} },