This file contains 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
require 'digest/sha2' | |
adjectives = %w[red orange blue green purple big small wide thin gray long dark high low white smooth cool hot dusty sticky furry nice mean rich poor yellow sad happy ] | |
nouns = %w[book ruler kleenex glasses wand scissors stapler eraser drive car truck road basketball skateboard statue box square circle tree grass flower plant rose ] | |
500.times do | |
password = adjectives[rand(adjectives.size)] + nouns[rand(nouns.size)] + rand(10).to_s | |
puts password + "\t" + Digest::SHA512.hexdigest(password + "thisGETSridOFrainbowTABLES") | |
end |
This file contains 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
roger@melchior [~/Staging/main-theme]$ php5 -a | |
Interactive shell | |
php > include("colors.php"); | |
php > print_r(DC_Colors::parsecss('rgba(32, 51, 41, 0.3)')); | |
Array | |
( | |
[0] => 32 | |
[1] => 51 | |
[2] => 41 |
This file contains 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 java.io.*; | |
import java.net.*; | |
import java.util.*; | |
import java.util.regex.*; | |
class AirBearsAutoLogin { | |
// Published URLs that SHOULD not change. | |
public static String google = "http://www.google.com/generate_204"; | |
public static String airbears = "https://wlan.berkeley.edu/cgi-bin/login/calnet.cgi"; |
This file contains 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 | |
/** | |
* Plugin Name: Month Name | |
* Description: Enables the <code>%monthcode%</code> and <code>%monthname%</code> tag for Permalinks. | |
* Author: Roger Chen | |
* License: GPLv2 | |
*/ | |
/** | |
* Enables use of monthname (january, june) and monthcode (jan, jun). |
This file contains 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/env python | |
class Vertex: | |
def __init__(self, value): | |
self.value = value | |
self.edges = {} | |
def degree(self): | |
return len(self.edges) | |
def __str__(self): | |
return str(self.value) |
This file contains 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/tabs-fennec.js | |
11c11,12 | |
< const { openTab, getTabs, getSelectedTab, getTabForBrowser: getRawTabForBrowser } = require('../tabs/utils'); | |
--- | |
> const { openTab, getTabs, getSelectedTab, getTabForBrowser: getRawTabForBrowser, | |
> getTabContentWindow } = require('../tabs/utils'); | |
21,22c22,23 | |
< const { isPrivateBrowsingSupported } = require('sdk/self'); | |
< const { isTabPBSupported } = require('sdk/private-browsing/utils'); | |
--- |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0" | |
xmlns:content="http://purl.org/rss/1.0/modules/content/" | |
xmlns:dsq="http://www.disqus.com/" | |
xmlns:dc="http://purl.org/dc/elements/1.1/" | |
xmlns:wp="http://wordpress.org/export/1.0/" | |
> | |
<channel> | |
<item> | |
<!-- title of article --> |
This file contains 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 Bitbucket UI Enhancement | |
// @namespace http://rogerhub.com/ | |
// @version 0.1 | |
// @match https://bitbucket.org | |
// @run-at document-end | |
// ==/UserScript== | |
var style_element = document.createElement('style'); | |
style_element.setAttribute('type', 'text/css'); |
This file contains 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 Change gradescope to pandagrader | |
// @namespace http://rogerhub.com/ | |
// @version 0.1 | |
// @match https://www.gradescope.com/* | |
// @run-at document-end | |
// ==/UserScript== | |
document.title = document.title.replace("Gradescope", "Pandagrader"); |
This file contains 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
var k = document.getElementsByClassName("resource_title"); | |
for (var i = 0; i < k.length; i++) { console.log(k[i].href); } |
OlderNewer