This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# A Rake interface to creating a tunnel using ssh. | |
# This file originally comes with the facebooker gem for Ruby on Rails: http://github.com/mmangino/facebooker | |
# | |
# How to use: | |
# 1. Simply put it at a proper place. e.g. lib/tasks/ in your Rails application | |
# 2. Create a config file 'easy_tunnel.yml' like following: | |
# | |
# development: | |
# public_host_username: host_user_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#products').append('<%= j render(@products) %>'); | |
<% if @products.next_page %> | |
$('.pagination').replaceWith('<%= j will_paginate(@products) %>'); | |
<% else %> | |
$('.pagination').remove(); | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following is a list of places where you can find job offers as a Rails developer: | |
https://twitter.com/currofile | |
https://twitter.com/domestikaempleo #spain only | |
http://www.workingwithrails.com/ | |
https://weworkremotely.com/jobs/search?term=rails | |
https://jobs.github.com/ | |
http://trabajosrails.com/ # spain only | |
http://www.indeed.com/q-Ruby-On-Rails-Developer-jobs.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Dialog = React.createClass({ | |
render: function() { | |
// 1) render nothing, this way the DOM diff will never try to do | |
// anything to it again, and we get a node to mess with | |
return React.DOM.div(); | |
}, | |
componentDidMount: function() { | |
// 2) do DOM lib stuff | |
this.node = this.getDOMNode(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Add this as bookmark in your browser and tap on the bookmark when your are creating a new PR. | |
Example: http://cl.ly/image/0D1k0d1W1R0Y/Screen%20Shot%202015-01-26%20at%203.57.30%20PM.png | |
*/ | |
javascript:(function() { | |
var e = document.getElementById('pull_request_body'); | |
if (e) {e.value +='#### :tophat: What? Why?\n\n\n#### :dart: What should QA test?\n\n\n#### :pushpin: Related tasks?\n\n\n#### :clipboard: Developer checklist\n- [ ] Unit Tests (if necessary)\n- [ ] UI Snapshot Tests (if necessary)\n- [ ] Added accessibility tags to any interactive element\n- [ ] Added reporting for GA (events + screen views) / Errors / Exceptions\n- [ ] Documentation\n\n#### :ghost: GIF\n![]()';} | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IPFS Barcelona hack day | |
 | |
libP2P | |
github.com/IPFS/specs | |
github.com/IPFS/pm | |
Download and install ipfs | |
Ipfs init |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, PropTypes } from 'react'; | |
import PopperJS from 'popper.js'; | |
export default class Popper extends Component { | |
state = {} | |
update = () => { | |
if (this.popperInstance) { | |
this.popperInstance.scheduleUpdate(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function logListenersForElement(element, eventType) { | |
if (!element) return; | |
const eventListeners = getEventListeners(element); | |
if (Object.keys(eventListeners).indexOf(eventType) !== -1) { | |
console.log({ | |
element, | |
listeners: eventListeners[eventType], | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SWAP The fcsonline way | |
# First make yourself sudo like this | |
sudo su | |
# The copy these lines in the console | |
fallocate -l 2G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rails production setup via SQLite3 made durable by https://litestream.io/ | |
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine. | |
# | |
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails | |
# | |
# in production you might want to map /data to somewhere on the host, | |
# but you don't have to! | |
# | |
FROM ruby:3.0.2 |
OlderNewer