Skip to content

Instantly share code, notes, and snippets.

View seangenabe's full-sized avatar

Sean Genabe seangenabe

View GitHub Profile
@seangenabe
seangenabe / readme.md
Last active August 29, 2015 14:06
Fastest way to add classes to HTML elements
@seangenabe
seangenabe / yt-stop-autoplay.user.js
Last active January 10, 2018 13:26
YouTube stop playlist autoplay user script
// ==UserScript==
// @name YouTube stop playlist autoplay
// @namespace http://gist.github.com/s4g6
// @version 1.0
// @match https://www.youtube.com/*
// @copyright MIT, Copyright (c) 2014 Sean Genabe <[email protected]>
// ==/UserScript==
// NB: This doesn't work right now. If anyone knows a fix, please contact me.
// http://ccs.adnu.edu.ph/acm-icpc2010/prob09_inverse_gaussian.pdf
import java.io.*;
import java.util.*;
public class InverseGaussian {
private static double accuracyNormal = 0.000000000001;
private static boolean diagnostic = false;
// http://ccs.adnu.edu.ph/acm-icpc2010/prob06_growing_pain.pdf
import java.io.*;
import java.util.*;
public class GrowingPain {
public static void main(String[] args) throws IOException {
(new GrowingPain()).run();
}
import java.util.*;
public class FactorialSolver
{
private static HashMap<Integer, Integer> factorials;
public static int factorial(int n) throws Exception {
if (factorials == null) {
factorials = new HashMap<Integer, Integer>();
factorials.put(0, 1);
import java.io.*;
import java.util.*;
public class BrickLaying {
public static void main(String[] args) throws IOException
{
(new BrickLaying()).run();
}
import java.io.*;
import java.util.*;
public class WordToNumber {
public static void main(String[] args) throws IOException {
(new WordToNumber()).run();
}
public void run() throws IOException {
@seangenabe
seangenabe / 118033.user.js
Created August 11, 2014 20:18
Ads Skipper (pulled from userscripts-mirror.org)
// ==UserScript==
// @name Ads Skipper
// @author .
// @namespace http://userscripts.org/scripts/show/118033
// @description No More waiting to skip their ads
// @updateURL http://userscripts.org/scripts/source/118033.meta.js
// @installURL http://userscripts.org/scripts/source/118033.user.js
// @version 3.2.6
// @grant unsafeWindow
@seangenabe
seangenabe / download.php
Created July 1, 2014 06:59
Download files to a remote server.
<?php
if (isset($_POST['url'])) {
if (empty($_POST['filename'])) {
$filename = 'download.bin';
}
else {
$filename = $_POST['filename'];
}
@seangenabe
seangenabe / import.php
Last active August 29, 2015 14:02
Import files uploaded on server to Wordpress
<?php
# If placed in wp-content/uploads
$path_to_wp_blog_header = '../../wp-blog-header.php';
# Directory relative to wp-content/uploads
$dir = 'import';
# Attach to post ID
$post_id = 0;
error_reporting(E_ALL);