Skip to content

Instantly share code, notes, and snippets.

View derencius's full-sized avatar
🍀
Wish me luck, I'm fixing my bugs

Marcus Derencius derencius

🍀
Wish me luck, I'm fixing my bugs
  • Ubatuba, São Paulo, Brazil
View GitHub Profile
@derencius
derencius / db.rb
Created September 13, 2021 15:29
DB - postgres restore
#!/usr/bin/env ruby
require 'thor'
class MyCLI < Thor
desc 'download', 'production database'
def download(remote = 'production')
puts "Downloading... #{remote}"
system "#{remote} pg:backups:capture"
system "curl `#{remote} pg:backups:url` -o #{remote}.dump"
puts 'Done!'
echo 'source /usr/local/opt/asdf/asdf.fish' >> ~/.config/fish/config.fish
@derencius
derencius / setup.md
Last active July 1, 2019 13:59
OSX Setup for ruby and mysql

mysql setup

brew install openssl
bundle config --global build.mysql2 --with-opt-dir="$(brew --prefix openssl)"
@derencius
derencius / keybase.md
Created February 9, 2018 06:18
keybase.md

Keybase proof

I hereby claim:

  • I am derencius on github.
  • I am derencius (https://keybase.io/derencius) on keybase.
  • I have a public key ASBolI3ej2VLacWmJhw3XnmSZT52-JoZaANncGiBWqCWfAo

To claim this, I am signing this object:

@derencius
derencius / settings.json
Last active May 10, 2017 04:14
vscode config
{
"editor.fontSize": 14,
"editor.tabSize": 2,
"editor.renderWhitespace": "boundary",
"editor.renderIndentGuides": true,
"editor.scrollBeyondLastLine": false,
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
@derencius
derencius / README
Created December 5, 2016 23:45
Heroku DB Download
requirement: your db name must have the same name as your app. (it does not have _development on the name)
save this script in a common folder outside your project.
@derencius
derencius / .rubocop.yml
Created January 21, 2016 22:26
Rubocop Configuration
Style/Documentation:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/StringLiterals:
Enabled: false
AllCops:
@derencius
derencius / Sensors.jsx
Last active October 20, 2015 17:52
coffee script vs es6
import React from 'react';
import _ from 'underscore';
class Sensor extends React.Component {
cssClass() {
if (this.props.toggled) {
return 'on';
}
else {
<%= favicon_link_tag %>
<%= favicon_link_tag "favicon/apple-icon-57x57.png", rel: "apple-touch-icon", sizes:"57x57" %>
<%= favicon_link_tag "favicon/apple-icon-60x60.png", rel: "apple-touch-icon", sizes:"60x60" %>
<%= favicon_link_tag "favicon/apple-icon-72x72.png", rel: "apple-touch-icon", sizes:"72x72" %>
<%= favicon_link_tag "favicon/apple-icon-76x76.png", rel: "apple-touch-icon", sizes:"76x76" %>
<%= favicon_link_tag "favicon/apple-icon-114x114.png", rel: "apple-touch-icon", sizes:"114x114" %>
<%= favicon_link_tag "favicon/apple-icon-120x120.png", rel: "apple-touch-icon", sizes:"120x120" %>
<%= favicon_link_tag "favicon/apple-icon-144x144.png", rel: "apple-touch-icon", sizes:"144x144" %>
<%= favicon_link_tag "favicon/apple-icon-152x152.png", rel: "apple-touch-icon", sizes:"152x152" %>
<%= favicon_link_tag "favicon/apple-icon-180x180.png", rel: "apple-touch-icon", sizes:"180x180" %>
<%= form_for(@stake) do |f| %>
<% if @stake.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@stake.errors.count, "error") %> prohibited this stake from being saved:</h2>
<ul>
<% @stake.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>