(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| # Install Git needed for Git based gems | |
| packages: | |
| yum: | |
| git: [] | |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| lmao=# CREATE TABLE "DELETE * FROM users" ("TRUNCATE TABLE" TEXT NOT NULL, "DROP DATABASE" TEXT NOT NULL); | |
| lmao=# INSERT INTO "DELETE * FROM users" ("TRUNCATE TABLE", "DROP DATABASE") VALUES ('lol', 'wtf'); | |
| lmao=# SELECT * FROM "DELETE * FROM users"; | |
| TRUNCATE TABLE | DROP DATABASE | |
| ----------------+--------------- | |
| lol | wtf | |
| (1 row) | |
| lmao=# |
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
This script scans your Dropbox (or any given folder) for folders stored in the ignore array and excludes them from syncing. Makes use of the official Dropbox CLI
I'm a beginner at bash, so all improvements are welcome!
#!/bin/bash
set -e
# SETTINGS| mkdir bash-fix | |
| cd bash-fix | |
| curl https://opensource.apple.com/tarballs/bash/bash-92.tar.gz | tar zxf - | |
| cd bash-92/bash-3.2 | |
| curl https://ftp.gnu.org/pub/gnu/bash/bash-3.2-patches/bash32-052 | patch -p0 | |
| curl https://ftp.gnu.org/pub/gnu/bash/bash-3.2-patches/bash32-053 | patch -p0 | |
| cd .. | |
| xcodebuild | |
| sudo cp /bin/bash /bin/bash.old | |
| sudo cp /bin/sh /bin/sh.old |
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |
Kris Nuttycombe asks:
I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?
I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.
I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.
With Ruby 1.8 (default version on MacOS) :
sudo gem install json
curl -s https://api.github.com/orgs/[ORGANIZATION]/repos | ruby -rubygems -e 'require “json”; JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["ssh_url"]} ]}'
With Ruby 1.9+, the json library is by default thus you just use :
| // ==UserScript== | |
| // @name Known Buffoon, Known buffoon, Donald Trump | |
| // @namespace https://gist.github.com/stewart | |
| // @description Prefixes any occurence of "Donald Trump" with "Known buffoon, " | |
| // @version 2015.08.09 | |
| // @author stewart | |
| // @run-at document-end | |
| // @include http* | |
| // ==/UserScript== | |
| (function() { |