Skip to content

Instantly share code, notes, and snippets.

View malcolmocean's full-sized avatar

Malcolm Ocean malcolmocean

View GitHub Profile
/* with stylish, use
[URLs starting with] https://mail.google.com
*/
.TC {
font-size: 0;
text-indent:-9999px;
line-height: 250px;
background:url(http://cdn1.iconfinder.com/data/icons/lin/128/7.png) center no-repeat;
}
@malcolmocean
malcolmocean / gist:11358623
Created April 28, 2014 00:08
Facebook chatonly
#leftCol, #rightCol, #pageHead, #pageFooter, #contentArea {display:none !important;}
/* Stylish: applies to
URL https://www.facebook.com/?chatonly
*/
@malcolmocean
malcolmocean / gist:11407213
Created April 29, 2014 17:44
Remove TinyChat extras
#share-bar, #header, #footer {display: none !important;}
/* Stylish:
URL: http://tinychat.com/nameofyourchatroom
*/
@malcolmocean
malcolmocean / geoff-yed-tips
Created April 19, 2015 05:40
Geoff's tips for setting up yEd
From Geoff Anders, of Leverage Research (http://www.leverageresearch.org/)
For people doing goal factoring - or for people making any sort of box-and-arrow diagram - I recommended the program yEd. It is available here: http://www.yworks.com/en/products_yed_about.html
After you install it, I highly recommend setting up the defaults in the following way:
1. Open yEd.
2. Create a new document.
3. Click the white background; a small yellow square should appear on the canvas.
4. Click the small yellow square so as to select it.
@malcolmocean
malcolmocean / ArduinoTextOnLEDs
Created June 15, 2015 21:38
Source code for making the word "Arduino" show up when you move 10 LEDs past very quickly
/* .-----------------,
* / Text on 10 LEDs \
* | malcolmocean.com |
* \ Malcolm Ocean /
* `-----------------'
*
* For a description of how this code is used, see:
* http://malcolmocean.com/2011/11/arduino-text-on-leds/
*
* Uses a modifed version of the circuit at http://tinyurl.com/d2hrud
@malcolmocean
malcolmocean / just6words.css
Created December 5, 2015 21:17
just six random words
@-moz-document domain("randomlists.com") {
.head_wrap,
footer,
#ness,
#meta,
h1
{display: none}
#result {
list-style: none;
@malcolmocean
malcolmocean / sane yed defaults.md
Created December 8, 2015 18:57
Sane yEd defaults
  1. Open yEd.
  2. Create a new document.
  3. Click the white background; a small yellow square should appear on the canvas.
  4. Click the small yellow square so as to select it.
  5. Click and drag one of the corners of the yellow square to resize it. Make it the default size you'd like your text boxes to be. You will be able to change this later.
  6. Make sure the yellow square is still selected.
  7. Look at the menu in the lower right. It is called "Properties View". It will show you information about the yellow square.
  8. Click the small yellow square in the menu next to the words "Fill Color".
  9. Select the color white for the Fill Color.
  10. Lower in the menu, under "Label", there is an item called "Placement". Find it. Change Placement to "Internal" and "Center".
/* install this userstyle: https://userstyles.org/styles/119231/facebook-2015
then replace the main code section with this code below
my changes are tagged with /* mychange * /
for the most part, these changes are to make the theme work better with my other styles:
- https://userstyles.org/styles/108325/facebook-postonly
- https://userstyles.org/styles/127266/facebook-post-interlude
note that the change at the very bottom hides the notification toasts,
a feature I find very distracting... but you may want them enabled!
*/
@malcolmocean
malcolmocean / Questions.xml
Created June 27, 2016 14:30
Modified Questions for the Credence Calibration Game (http://acritch.com/credence-game/)
<?xml version="1.0" encoding="utf-8"?>
<!-- for use with http://acritch.com/credence-game/ -->
<Questions>
<QuestionGenerator Used="y" Type="Sorted" Weight="1" QuestionText="Which US state had a higher population in 2010?" AdjacentWithin="-1" InfoPrefix="" InfoSuffix=" people">
<Answer Text="California" Value="37,253,956" />
<Answer Text="Texas" Value="25,145,561" />
<Answer Text="New York" Value="19,378,102" />
<Answer Text="Florida" Value="18,801,310" />
<Answer Text="Illinois" Value="12,830,632" />
<Answer Text="Pennsylvania" Value="12,702,379" />
@malcolmocean
malcolmocean / interval-worker.js
Last active April 28, 2017 14:40
Angular Worker-based Interval (to avoid Chrome background tab throttling)
var timers = {}
function fireInterval(id) {
this.postMessage({id: id})
}
var commands = {
setInterval: function W_setInterval(data) {
var time = parseInt(data.time || 0, 10)
timer = setInterval(fireInterval.bind(null, data.id), time)