Skip to content

Instantly share code, notes, and snippets.

creatin' some stuff

Tomasz Ducin ducin

creatin' some stuff
View GitHub Profile

‪“‬In what way is JS any more maintainable than CSS? How does writing CSS in JS make it any more maintainable?”

‪Happy to chat about this. There’s an obvious disclaimer that there’s a cost to css-in-js solutions, but that cost is paid specifically for the benefits it brings; as such it’s useful for some usecases, and not meant as a replacement for all workflows. ‬

‪(These conversations always get heated on twitter, so please believe that I’m here to converse, not to convince. In return, I promise to listen to you too and change my opinions; I’ve had mad respect for you for years and would consider your feedback a gift. Also, some of the stuff I’m writing might seem obvious to you; I’m not trying to tell you if all people of some of the details, but it might be useful to someone else who bumps into this who doesn’t have context)‬

So the big deal about css-in-js (cij) is selectors.


The scope of a variable is the region of the program in which you can directly access the variable:

if (true) {
  let x = 123;

Here, the scope of x is the then-block of this if-then-else statement.

rosario /
Created Jan 17, 2018 — forked from Geoff-Ford/
Eric Elliott's Composing Software Series
ducin / reveal.js
Created Sep 19, 2016
View reveal.js
keyboard: {
40: 'next',
38: 'prev'
btroncone /
Last active Jan 14, 2021
RxJS 5 Operators By Example
uranusjr /
Created Aug 22, 2014
Script to install ensurepip to Python. “Fix” the Ubuntu 14.04 / Debian Sid bug.
import os
import sys
import io
import tarfile
import urllib.request
ducin / console-load-js-script.js
Last active Nov 6, 2020
load js script from blank page browser (execute following code in the browser console)
View console-load-js-script.js
root.getScript = function(url) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
freeeve /
Created Nov 13, 2012
cypher shell script
Wess-MacBook-Pro:bin wfreeman$ cat test.cypher
create (m {name:"m"});
create (n {name:"n"});
Wess-MacBook-Pro:bin wfreeman$ ./neo4j-shell -c < test.cypher
Welcome to the Neo4j Shell! Enter 'help' for a list of commands
NOTE: Remote Neo4j graph database service 'shell' at port 1337
neo4j-sh (?)$ create (m {name:"m"});
jonnyreeves / testrunner.html
Created Jun 2, 2012
Unit Testing Promises with Sinon.js
View testrunner.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<link rel="stylesheet" href="" type="text/css" media="screen" />
<!-- when.js Promises implementation -->
<script src=""></script>
<!-- Unit testing and mocking framework -->
<script type="text/javascript" src=""></script>
ryanflorence / universal-module.js
Created Sep 6, 2011
Universal JavaScript Module, supports AMD (RequireJS), Node.js, and the browser.
View universal-module.js
(function (name, definition){
if (typeof define === 'function'){ // AMD
} else if (typeof module !== 'undefined' && module.exports) { // Node.js
module.exports = definition();
} else { // Browser
var theModule = definition(), global = this, old = global[name];
theModule.noConflict = function () {
global[name] = old;
return theModule;
You can’t perform that action at this time.