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 | |
""" | |
zip_compare.py | |
Compares directory/file tree structure in two compressed files. Designed for | |
archives labeled "Semester Course Version.zip". | |
Distrubuted under the terms of the | |
GNU GPL-3.0+ License <http://www.gnu.org/licenses/gpl-3.0.txt> | |
Copyright (C) 2017 Andrew Gu |
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 | |
""" | |
test_inf-scroll.py | |
--- | |
A quick example to demonstrate loading infinite-scroll elements with Selenium | |
and retrieving data from the page. | |
""" | |
from selenium import webdriver | |
import time |
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
// Source: https://answers.acrobatusers.com/Unable-to-uncheck-the-checked-option-box-q197757.aspx | |
if (event.target.lastVal == event.target.value) { | |
event.target.lastVal = null; | |
event.target.value = "Off"; | |
} else { | |
event.target.lastVal = event.target.value; | |
} |
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
<?php | |
// Don't forget to make this file private (.htaccess) | |
$file_path = "./users.txt"; | |
function auth_check($user, $pass) { | |
$file = file($GLOBALS["file_path"]); | |
// Find lines identifying the specified user | |
$user_enc = base64_encode($user); | |
$user_regex = "/^{$user_enc}::.*$/"; |
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
%% read_hist | |
% | |
% Reads MATLAB command history, returns a structure usable in programs | |
% | |
% Returns a MATLAB structure: | |
% | |
% - First level structure references by 's#' where '#' is the index of | |
% index of the session where commands are run (starting from 1) | |
% - Second level structure references by 'c#' where '#' is the index of | |
% the command run in the session (starting from 1). The first command |
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
jQuery.fn.extend({ | |
// Materialize Chips | |
'addChip': function (chips) { | |
this.data('chips', this.data('chips').concat(chips)); | |
let to_add = [], | |
new_chip = function(name) { | |
return div = $('<div>').text(name).attr('class', 'chip').append($('<i>').text('close').attr('class', 'material-icons close')); | |
}; | |
if (typeof chips === 'string') { // single string | |
to_add.push(chips); |
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
// ==UserScript== | |
// @name MathJax | |
// @namespace https://www.mathjax.org/ | |
// @version 1.0 | |
// @description Injects MathJax into all pages, and begin auto-rendering | |
// @author Andrew Gu | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== |
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
% Plot amplitude vs. distance | |
dist = [0.15, 1.04:0.4:4.24]; | |
ampl = [7.5, 5.6, 4.4, 3.6, 3.0, 2.5, 2.2, 1.9, 1.5, 1.1]; | |
scatter(dist, ampl); | |
% Overlay Equation 1.1 | |
hold on; | |
x = [0.15, 4.24]; | |
y = -2 * x + 8; | |
plot(x, y); |
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
aand | and | |
---|---|---|
abilites | abilities | |
abilitiy | ability | |
abilties | abilities | |
abiltities | abilities | |
abiltiy | ability | |
abilty | ability | |
abitlities | abilities | |
ablity | ability | |
abloished | abolished |
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 off | |
REM Adds random watermarks on top of images with ImageMagick | |
REM Used cat images from DuckDuckGo, thus the program name | |
REM Needs the following folders to be in the working directory: | |
REM "input" Input images to watermark | |
REM "output" Empty directory for watermarked images | |
REM "watermark" Images to overlay |
OlderNewer