Skip to content

Instantly share code, notes, and snippets.

View dayvsonlima's full-sized avatar

Dayvson Lima dayvsonlima

View GitHub Profile
@dayvsonlima
dayvsonlima / readme.md
Created March 15, 2018 20:56 — forked from romuloctba/readme.md
Install Adobe Photoshop CS6 on Wine (Ubuntu, Elementary OS, Linux Mint)

Step 1. Install the Wine Team Ubuntu PPA

First start by installing Wine btw it's a utility to install windows apps in linux :

open the Terminal and :

   sudo add-apt-repository ppa:ubuntu-wine/ppa     
   sudo apt-get update && sudo apt-get upgrade
   sudo apt-get install wine1.7 winetricks
@dayvsonlima
dayvsonlima / example_activejob.rb
Created January 6, 2017 13:24 — forked from ChuckJHardy/example_activejob.rb
Example ActiveJob with RSpec Tests
class MyJob < ActiveJob::Base
queue_as :urgent
rescue_from(NoResultsError) do
retry_job wait: 5.minutes, queue: :default
end
def perform(*args)
MyService.call(*args)
end
@dayvsonlima
dayvsonlima / sounder.rb
Created December 22, 2016 01:19 — forked from jashkenas/sounder.rb
A Demonstration of Minim in Ruby-Processing
# Sounder sounds for class
# Requires an active microphone to pick up anything
require 'ruby-processing'
class MinimTest < Processing::App
load_library "minim"
import "ddf.minim"
import "ddf.minim.analysis"
resources:
Resources:
IamRoleLambda:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
-
Effect: Allow
RSpec.describe PagesController, type: :controller do
describe '#destroy' do
context 'when invalid scenario' do
context 'and resource is not found' do
# setup...
let() {...}
let() {...}
let() {...}
subject {}
@dayvsonlima
dayvsonlima / gist:0f4a64b4679cb597a9cc
Created October 26, 2015 12:48 — forked from edvinasbartkus/gist:0e99ea8305a20737f562
Ruby puma.gem install on El Capitan
gem install puma -- --with-cppflags=-I/usr/local/opt/openssl/include --with-ldflags=-L/usr/local/opt/openssl/lib
@dayvsonlima
dayvsonlima / install-redis.sh
Created October 22, 2015 11:10 — forked from dstroot/install-redis.sh
Install Redis on Amazon EC2 AMI
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
# Funciona perfeitamente bem
<% cache "tags", skip_digest: true do %>
<% current_user.each do |tag| %>
<%= tag.name %>
<% end %>
<% end %>
# Simplesmente não renderiza nada
<% cache ["tags", current_user], skip_digest: true do %>
# -*- coding: utf-8 -*-
require 'rubygems'
require 'RMagick'
filename = ARGV.first
unless filename
warn "usage: #{$0} <ANIMATION GIF FILE>"
exit 1
end