Note: To keep this even smaller, we're using a small helper module called the hyperswarm replicator, which wraps a few Hyperswarm setup details.
#Script to extract to data from google cache This is a simple python script which retrieves content like your blog posts from googles cache, you can use this if your servers hard drive crashes or if a meteor hits your data center.
Remove the time.sleep
code if you don't have more than 50 pages to retrieve.
##Original Source
<script type="text/ng-template" id="one.html"> | |
<div>This is first template</div> | |
</script> | |
<script type="text/ng-template" id="two.html"> | |
<div>This is second template</div> | |
</script> |
# coding: utf-8 | |
require 'sinatra' | |
set server: 'thin', connections: [] | |
get '/' do | |
halt erb(:login) unless params[:user] | |
erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
end | |
get '/stream', provides: 'text/event-stream' do |
import React from 'react'; | |
import _ from 'lodash'; | |
import Rx from 'rx'; | |
import superagent from 'superagent'; | |
let api = { | |
host: 'http//localhost:3001', | |
getData(query, cb) { | |
superagent |
The final result: require() any module on npm in your browser console with browserify
This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.
Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5
- Download Microsoft Edge VM from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
- Download Virtualbox and import the Edge VM image.
Then in the VM:
- Install guest addons in the VM
- Download & install latest NVDA from nvaccess.org
- Download & install SharpKeys and use it to map left an alternative key (eg. Left Ctrl) to the Insert key. This is needed because Macs do not typically have an “Insert” key which is the prefix for many NVDA commands.
/*! | |
* gulp | |
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
*/ | |
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
cssnano = require('gulp-cssnano'), |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
This is some sort of answer to recent posts regarding Web Components, where more than a few misconceptions were delivered as fact.
Let's start by defining what we are talking about.
As you can read in the dedicated GitHub page, Web Components is a group of features, where each feature works already by itself, and it doesn't need other features of the group to be already usable, or useful.