Skip to content

Instantly share code, notes, and snippets.

View nobitagit's full-sized avatar
🕸️
The less I know the better

Aurelio nobitagit

🕸️
The less I know the better
View GitHub Profile
@staltz
staltz / introrx.md
Last active July 13, 2025 10:33
The introduction to Reactive Programming you've been missing
@mfunkie
mfunkie / exampleUsage.html
Created August 15, 2014 14:48
Template Popover for Angular-UI Bootstrap
<div ng-app="myModule">
<script type="text/ng-template" id="myTemplatePopover.html">
<div ng-controller="PopoverTestCtrl">
<span>Is it not <b style="color:red;">glorious</b> to have <i>html</i> in a popover?</span>
<span>{{ theStuff }}</span>
<button class="btn btn-danger" ng-click="$popover.close()">Try closing here!</span>
</div>
</script>
<button class="btn btn-success" template-popover="myTemplatePopover.html" template-popover-title="I'm a title!" template-popover-placement="bottom">You can have popovers with templates too!</button>

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

@jml6m
jml6m / README.md
Last active September 25, 2023 08:55 — forked from mbostock/.block

This example, using satirical data from The Onion, demonstrates how to wrap long axis labels to fit on multiple lines.

UPDATE: In order to make this code work for horizontal bar charts, the code for setting the 'y' attribute must be used when setting the 'x' attribute. I've included only the wrap function in this fork.

@parambirs
parambirs / sfti_ch05_exercises.scala
Created January 4, 2015 02:11
Scala for the Impatient: Chapter 5 exercises solutions
// 1. Improve the Counter class in Section 5.1, "Simple Classes and Parameterless
// Methods," on page 51 so that it doesn't turn negative at Int.MaxValue.
class Counter {
private var value = 0
def increment() { if(value < Int.MaxValue) value += 1 }
def current = value
def isLess(other: Counter) = value < other.value // can access private field of other object
}

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

@priyajeet
priyajeet / gist:c2731789d3a688ee85a9
Last active August 29, 2015 14:19
T3/React usage rough hack
// todo-list module
Application.addModule('todo-list', function(context) {
var xhr;
var TodoList = React.createClass({
render: function() {
return (
<div>
<TodoItems />
@prasadsilva
prasadsilva / fresh-chrome-with-custom-tz.sh
Last active October 8, 2024 12:47 — forked from stuartsierra/fresh-chrome.sh
Launch new instances of Google Chrome on OS X with isolated cache, cookies, user config and custom Timezone
#!/usr/bin/env bash
# fresh-chrome
#
# Use this script on OS X to launch a new instance of Google Chrome
# with its own empty cache, cookies, and user configuration.
#
# The first time you run this script, it will launch a new Google
# Chrome instance with a permanent user-data directory, which you can
# customize below. Perform any initial setup you want to keep on every
@Zodiase
Zodiase / es6-abstract-class-example.js
Last active July 18, 2022 11:03
ES6 Abstract Class Example
'use strict';
class Abstract {
// A static abstract method.
static foo() {
if (this === Abstract) {
// Error Type 2. Abstract methods can not be called directly.
throw new TypeError("Can not call static abstract method foo.");
} else if (this.foo === Abstract.foo) {
// Error Type 3. The child has not implemented this method.
throw new TypeError("Please implement static abstract method foo.");