I hereby claim:
- I am b-luu on github.
- I am bluu (https://keybase.io/bluu) on keybase.
- I have a public key whose fingerprint is 285E 9B2D 4998 0199 CCB7 A756 51F6 2513 CE3F 9F68
To claim this, I am signing this object:
// Adapted from https://github.com/Ollie-Boyd/Linkedin-post-timestamp-extractor | |
function getPostId(linkedinURL) { | |
// const linkedinURL= document.querySelector("#url").value; | |
const regex = /([0-9]{19})/; | |
const postId = regex.exec(linkedinURL).pop(); | |
return postId; | |
} | |
function extractUnixTimestamp(postId) { |
#! /usr/bin/env python3 | |
import sys | |
HUMAN_READABLE_UNITS = {1: 'K', 2: 'M', 3: 'G', 4: 'T'} | |
def format_float(number, decimal=1): | |
if f"{number:.{decimal}f}"[-1] == "0" and decimal > 0: | |
return format_float(number, decimal - 1) | |
return f"{number:.{decimal}f}" |
## First off, download a (any) distro's ISO/IMG (prefer torrent downloading for robustness...) | |
# from https://docs.fedoraproject.org/quick-docs/en-US/creating-and-using-a-live-installation-image.html | |
## Identify the name of the USB drive partition | |
lsblk -f | |
## Unmount all mounted partition from that device. This is very important, otherwise the written image might get corrupted. You can unmount all mounted partitions from the device with | |
sudo umount /dev/sdX* # where X is the appropriate letter, e.g. umount /dev/sdc*. | |
## Write the ISO file to the device |
""" | |
example usage: | |
import time | |
from math import sqrt | |
def display_out(timer, func, display=print, erase=False): | |
if erase: | |
display = lambda message: print(f"\r{message}", end='') | |
display( | |
f"[{timer.name}|{func.__name__}] {timer.iteration}. " |
Update-ExecutionPolicy RemoteSigned | |
Disable-MicrosoftUpdate | |
Disable-UAC | |
Disable-BingSearch | |
Disable-GameBarTips | |
Move-LibraryDirectory "Personal" "E:\Documents" | |
Move-LibraryDirectory "My Video" "E:\Videos" | |
Move-LibraryDirectory "My Pictures" "E:\Photos" |
import os | |
def find_repo_root(start_dir='.'): | |
start_dir = os.path.abspath(start_dir) | |
if '.git' not in os.listdir(start_dir): | |
assert start_dir != '/', "No Git repo found in given folder or its parents." | |
return find_repo_root(os.path.join(start_dir, '..')) | |
return start_dir | |
def get_branch_name(start_dir='.'): |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
# RescueTime Data Exporter | |
# Dan Nixon 18/09/2011 | |
# Chris Burgess 03/08/2015 | |
# Brice Luu 20/05/2016 | |
import urllib | |
import sys |