Skip to content

Instantly share code, notes, and snippets.

al cmdoptesc

Block or report user

Report or block cmdoptesc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cmdoptesc
cmdoptesc / hn_search_with_sort.js
Last active Apr 12, 2016 — forked from kristopolous/hn_seach.js
HackerNews "Who is Hiring" Search w/ Date Sorting
View hn_search_with_sort.js
function query() {
var SORT_RECENT_FIRST = true;
var SEARCH_REPLIES = true;
var query_list = Array.prototype.slice.call(arguments);
var commentTable = document.querySelector('.comment-tree');
var commentNodes = Array.prototype.slice.call(commentTable.querySelectorAll('.athing'));
var COMMENT_TEXT_SELECTOR = '.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88';
@cmdoptesc
cmdoptesc / manually-trigger-checkbox-change-event.js
Created Nov 29, 2016
Update Switchery toggle-switch to reflect checkbox state via Javascript
View manually-trigger-checkbox-change-event.js
// Manually trigger a change event on a checkbox element to have Switchery update its toggle state
// https://github.com/abpetkov/switchery/issues/27
// http://jsfiddle.net/3am89/
function onChange(checkboxEl) {
if (typeof Event === 'function' || !document.fireEvent) {
var event = document.createEvent('HTMLEvents');
event.initEvent('change', true, true);
checkboxEl.dispatchEvent(event);
View keybase.md

Keybase proof

I hereby claim:

  • I am cmdoptesc on github.
  • I am cmdoptesc (https://keybase.io/cmdoptesc) on keybase.
  • I have a public key whose fingerprint is 59DA 9BAB 126F 9AFC BCFE 6BA8 1918 CAA8 286A 134E

To claim this, I am signing this object:

@cmdoptesc
cmdoptesc / .macos
Created Feb 17, 2017
Mathias Bynen's macOS defaults script
View .macos
#
# Originally..
# https://github.com/mathiasbynens/dotfiles/blob/master/.macos
#
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
# Close any open System Preferences panes, to prevent them from overriding
View olo_widget.css
.up-olo-opener {
cursor: pointer;
}
.up-olo-container, .up-olo-overlay {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
@cmdoptesc
cmdoptesc / change_screenshots_path.md
Created Feb 1, 2018
Change macOS / OSX screenshots location
View change_screenshots_path.md

defaults write com.apple.screencapture location ~/Desktop/screenshots

killall SystemUIServer

@cmdoptesc
cmdoptesc / Readme.md
Last active Feb 12, 2018
JavaScript D3: Arc tween transitions using attrTween and attr methods
View Readme.md

D3: Arcs Tweening Animation

view on bl.ocks.org

Click on the grey circles. The green arcs will transition using attr, whereas the red ones will use the attrTween method.

If you have not seen/read Bostock's arc tween example, it's probably the best place to start. Secondly, I've posted up a basic example of drawing static, concentric arcs (gist), which might be helpful before adding on tweens/animations.

Below is some annotated source code from my experience playing with arcs. The biggest issue I came across was understanding the role of the arcTween helper function in relation to attrTween. Unlike attr, which takes a value as its second argument, attrTween requires a helper function, arcTween, which will be called during the intermediary animation ticks. This method was used for my [muniNow project](http

@cmdoptesc
cmdoptesc / .block
Last active Feb 14, 2018 — forked from mbostock/.block
Municipalities of Mexico II - How to convert a shapefile to TopoJSON by M Bostock
View .block
border: no
height: 600
license: gpl-3.0
@cmdoptesc
cmdoptesc / uszipgeo.json
Last active Feb 20, 2018
uszipgeo.json
View uszipgeo.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cmdoptesc
cmdoptesc / Readme.md
Last active Mar 4, 2018
JavaScript D3: Drawing Concentric Arcs
View Readme.md
You can’t perform that action at this time.