Updated: 2017-08-10
The "MUST HAVE" extensions and addons are those that I would recommend every browser have installed. I would not surf the web without these.
def lovelike(jenni, input): | |
if input.sender in ['#reddit-baseball']: | |
return | |
if random.random() <= 0.25: | |
verb = input.group(1) | |
obj = input.group(2) | |
if len(obj) >= 100: | |
obj = obj[:100] + ' [...]' | |
out = 'I ' |
import re | |
txt = 'some smoe msoe soem http://www.google.com/meep/peem/peme soMe sMoe Msoe soeM https://www.google.com/meep/peem/pmep/ soem msoe smoe some' | |
def my_replace(match): | |
if not str(match.group()).startswith('http'): | |
return re.sub('(?i)m', '_', match.group()) | |
else: | |
return match.group() | |
#!/bin/bash | |
#title :wildfly-install.sh | |
#description :The script to install Wildfly 10.x | |
#more :http://sukharevd.net/wildfly-8-installation.html | |
#author :Dmitriy Sukharev | |
#date :2016-06-18T02:45-0700 | |
#usage :/bin/bash wildfly-install.sh | |
#tested-version1 :10.0.0.CR3 | |
#tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22 | |
#tested-version2 :10.0.0.Final |
'use strict'; | |
/** | |
* Background script entry point | |
* | |
* - sets up injecting mechanism for supported sites | |
* - creates controllers for each recognized tab | |
* - sets up all chrome.* listeners, which are forwarded controllers if needed | |
* - checks auth status on run (browser start or extension enabling) and prompts for login if needed | |
*/ |
def formatnumber(n): | |
"""Format a number with beautiful commas.""" | |
parts = list(str(n)) | |
for i in range((len(parts) - 3), 0, -3): | |
parts.insert(i, ',') | |
return ''.join(parts) |
#!/usr/bin/env python3 | |
## This works in Python 2 and Python 3 | |
import datetime as dt | |
for x in range(2020, 1000000, 4): | |
t = dt.datetime(x, 2, 29) | |
if t.weekday() == 0: | |
print("Found it! {0}".format(x)) |