This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
SortTable | |
version 2 | |
7th April 2007 | |
Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ | |
Instructions: | |
Download this file | |
Add <script src="sorttable.js"></script> to your HTML | |
Add class="sortable" to any table you'd like to make sortable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var s=document.createElement('script');s.src='https://cdnjs.cloudflare.com/ajax/libs/mark.js/7.0.0/mark.min.js';s.onload=function(){(new Mark(document.body)).mark(["err", "warn", "fail", "exception"])};document.head.appendChild(s);})() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Inspired by this bogus TIL: https://www.reddit.com/r/todayilearned/comments/54c05w/til_there_are_923_words_in_the_english_language/ | |
Downloaded this corpus: https://sourceforge.net/projects/wordlist/files/SCOWL/2016.06.26/scowl-2016.06.26.zip/download?use_mirror=pilotfiber | |
From http://wordlist.aspell.net/ | |
SCOWL (Spell Checker Oriented Word Lists) | |
The results of running this script are: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Echo server program | |
import socket | |
import time | |
# Symbolic name meaning all available interfaces | |
HOST = '' | |
# Arbitrary non-privileged port | |
PORT = 18080 | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.bind((HOST, PORT)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
/* This is my error handler to show myself and users when errors are happening */ | |
/* See: https://gist.github.com/ubershmekel/66abb3987b116b4824201f9cd72e1dd9 /* | |
/* style from http://www.w3schools.com/howto/howto_js_snackbar.asp */ | |
/* The snackbar - position it at the bottom and in the middle of the screen */ | |
#snackAlertsContainer { | |
position: fixed; /* Sit on top of the screen */ | |
z-index: 1; /* Add a z-index if needed */ | |
bottom: 30px; /* 30px from the bottom */ | |
width: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\shell\ccollab] | |
@="CodeCollab Review" | |
"Icon"="\"C:\\Program Files\\Collaborator Client\\ccollab.exe\"" | |
[HKEY_CLASSES_ROOT\Directory\shell\ccollab\command] | |
@="\"C:\\Program Files\\Collaborator Client\\ccollab.exe\" addchanges ask %V" | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\ccollab] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Concatenate a few video files into one with ffmpeg | |
Use a wild card | |
""" | |
import subprocess | |
import glob | |
import re | |
to_concat = 'robocar*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import ctypes | |
import time | |
import sys | |
LONG = ctypes.c_long | |
DWORD = ctypes.c_ulong | |
ULONG_PTR = ctypes.POINTER(DWORD) | |
WORD = ctypes.c_ushort |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import random | |
from PIL import Image | |
from tqdm import tqdm | |
images = glob.glob('pngs2/*.png') | |
width = 700 | |
height = 700 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
court.gov.il for some reason send out these signed files with the "sgn" file extension. | |
They're xml files with base64 encoded contents, this is how you can get them out. | |
open_sgn.py myfile.sgn | |
""" | |
import base64 |