Skip to content

Instantly share code, notes, and snippets.

@cmalven
cmalven / index.html
Last active April 27, 2024 10:17
Shortest (useful) HTML5 Document
<!-- http://www.brucelawson.co.uk/2010/a-minimal-html5-document/ -->
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>blah</title>
</head>
<body>
<p>I'm the content</p>
@CMCDragonkai
CMCDragonkai / regular_expression_engine_comparison.md
Last active July 24, 2024 16:22
Regular Expression Engine Comparison Chart

Regular Expression Engine Comparison Chart

Many different applications claim to support regular expressions. But what does that even mean?

Well there are lots of different regular expression engines, and they all have different feature sets and different time-space efficiencies.

The information here is just copied from: http://regular-expressions.mobi/refflavors.html

@define-private-public
define-private-public / HttpServer.cs
Last active July 24, 2024 05:35
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@Nt-gm79sp
Nt-gm79sp / powercfg-win10-more-settings.cmd
Last active June 12, 2024 13:39 — forked from theultramage/powercfg-win7-all-settings.bat
Show/hide hidden settings in Win10 Power Options
@echo on
REM checked for Windows 10
REM fork from https://gist.github.com/theultramage/cbdfdbb733d4a5b7d2669a6255b4b94b
REM you may want full list https://gist.github.com/raspi/203aef3694e34fefebf772c78c37ec2c
REM SET attrib=+ATTRIB_HIDE
SET attrib=-ATTRIB_HIDE
REM Hard disk burst ignore time
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 80e3c60e-bb94-4ad8-bbe0-0d3195efc663 %attrib%
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active July 27, 2024 11:52
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@willwhitney
willwhitney / load_tf.py
Created July 10, 2018 16:11
load tensorboard log files into pandas dataframes
from tensorboard.backend.event_processing import event_accumulator
import tensorflow as tf
import glob
import pandas as pd
tf.logging.set_verbosity(tf.logging.ERROR)
basedir = "/path/to/log/directory/"
def load_tf(dirname):
prefix = basedir + "tboard/VisibleSwimmer-v2/"
@jdhao
jdhao / str_byte_convert.md
Created May 31, 2019 10:30
Convert Unicode string to bytes and convert bytes back to Unicode string in Python 3

Conversion between bytes and string in Python 3

To convert Unicode string to bytes object, you can use two methods:

  • 'hello'.encode('utf-8')
  • bytes('hello', encoding='utf-8')

To convert bytes back to Unicode string, you can use two methods:

  • b'\xe4\xbd\xa0\xe5\xa5\xbd'.decode('utf-8')
@zaxbux
zaxbux / readme.md
Last active August 17, 2023 15:32
Windows System Colours (by OS)

Colors

Windows

Window

Color of the background of the client area of a window.

WindowFrame