Skip to content

Instantly share code, notes, and snippets.

@midudev
midudev / testing_feedparser_ES6.js
Last active August 19, 2018 06:31
Example of using feedparser (https://github.com/danmactough/node-feedparser) with ES6 on node.js >= 4.0.0
'use strict'
const FeedParser = require('feedparser')
const request = require('request')
let req = request('https://github.com/danmactough.atom')
let parser = new FeedParser()
req.on('error', (err) => {
// handle request error
@domenic
domenic / 0-github-actions.md
Last active April 8, 2024 23:35
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@christianp
christianp / id_mathjax_plugin.js
Created August 29, 2013 10:44
IntenseDebate MathJax plugin. Paste it into http://intensedebate.com/pluginEditor/ There's a bug in IntenseDebate at the moment - backslashes are stripped out of newly-posted comments, which knacks TeX thoroughly. Reloading the page gets you the correct text, slashes included.
var id_mathjax_plugin;
(function() {
var mjp = id_mathjax_plugin = {
load_mathjax: function() {
function e(e){var t='.MathJax .mn {background: inherit;} .MathJax .mi {color: inherit;} .MathJax .mo {background: inherit;}',n=e.createElement('style');n.innerText=t;try{n.textContent=t}catch(r){}e.getElementsByTagName('body')[0].appendChild(n);var i=e.createElement('script'),s;i.src='https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js',i.type='text/javascript',s='MathJax.Hub.Config({skipStartupTypeset:true,tex2jax:{inlineMath:[[\'$\',\'$\']],displayMath:[[\'\\\\[\',\'\\\\]\']],processEscapes:true}});MathJax.Hub.Startup.onload();',window.opera?i.innerHTML=s:i.text=s,e.getElementsByTagName('head')[0].appendChild(i)}function t(t){t.MathJax===undefined?e(t.document):t.MathJax.Hub.Queue(new t.Array('Typeset',t.MathJax.Hub))}var n=document.getElementsByTagName('iframe'),r,i;t(window);for(r=0;r<n.length;r++)i=n[r].contentWindow||n[r].contentDocument,i.document||(i=i.parentN
@Carreau
Carreau / kernel.js
Created December 13, 2012 20:09
A node.js kernel for IPython notebook. You can see the explanation of the ipynb rendered in http://nbviewer.ipython.org
zmq = require("zmq")
fs = require("fs")
var config = JSON.parse(fs.readFileSync(process.argv[2]))
var connexion = "tcp://"+config.ip+":"
var shell_conn = connexion+config.shell_port
var pub_conn = connexion+config.iopub_port
var hb_conn = connexion+config.hb_port
@darribas
darribas / howto_setup_landslide.md
Created December 11, 2012 09:54
How to setup `landslide` to work with LaTeX rendering

How to setup landslide to work with LaTeX rendering

This short howto is intended to be a mental note for myself so I don't have to spend all the wasted hours that took me to figure out howto get landslide up and running and beautifully displaying LaTeX on the slides. If you find it useful, good for you ;-)


Disclaimer

@phck
phck / byword.mmd
Created December 9, 2012 17:12
You can add Latex-style equations by including MathJax at the beginning of the file:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@HungMingWu
HungMingWu / _config.yaml.diff
Created December 7, 2012 08:36
Latex on Octopress
index 1a06ae2..ef440ea 100644
--- a/_config.yml
+++ b/_config.yml
@@ -33,7 +33,7 @@ destination: public
plugins: plugins
code_dir: downloads/code
category_dir: blog/categories
-markdown: rdiscount
+markdown: kramdown
pygments: false # default python pygments have been replaced by pygments.rb
@satomacoto
satomacoto / mathjax.html
Created November 29, 2012 06:15
MathJax Dynamic Math Test Page
<!DOCTYPE html>
<!-- http://docs.mathjax.org/en/v1.1-latest/typeset.html -->
<html>
<head>
<meta charset="utf-8">
<title>MathJax Dynamic Math Test Page</title>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [["$","$"],["\\(","\\)"]]
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>moments -- Sage</title>
<link type="text/css" rel="stylesheet" href="/css/main.css" />