Skip to content

Instantly share code, notes, and snippets.

🍰

yaojie causztic

🍰
Block or report user

Report or block causztic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@causztic
causztic / Lottery.sol
Created Nov 7, 2018
Simple lottery with debt collection at the end of grace period
View Lottery.sol
pragma solidity ^0.4.17;
contract Lottery{
uint public MAX_PLAYERS = 2;
address[] public players;
address public manager;
uint public blockNumber;
constructor() public{
@causztic
causztic / gsoc-2018-actionable-errors.md
Last active Apr 2, 2019
Actionable Errors and new Error Page Design for Ruby on Rails
View gsoc-2018-actionable-errors.md

During GSOC 2018 I have proposed and worked on a feature for Ruby on Rails - Actionable Errors. https://github.com/rails/rails/pull/34788

Summary

Currently, errors with a defined flow to fix them have to be done manually (e.g. when there are pending migrations or when credentials are not found.)

With the new ActionableException concern in ActiveSupport, maintainers for various Ruby on Rails libraries with their special error classes will be able to extend this module and provide the appropriate Actions to take, which the user can activate by clicking on a button.

Description

View slim-html5-boilerplate
doctype html
/[if lt IE 7]
html.no-js.ie6.oldie lang="en"
/[if IE 7]
html.no-js.ie7.oldie lang="en"
/[if IE 8]
html.no-js.ie8.oldie lang="en"
/[if gte IE 8]
html.no-js lang="en"
head
@causztic
causztic / clockwork.rb
Last active Dec 15, 2015 — forked from rogercampos/clockwork.rb
Capistrano running clockwork as daemon with upstart
View clockwork.rb
after "deploy:stop", "clockwork:stop"
after "deploy:start", "clockwork:start"
after "deploy:restart", "clockwork:restart"
set :clockwork_roles, :blabla
set :cw_log_file, "#{current_path}/log/clockwork.log"
set :cw_pid_file, "#{current_path}/tmp/pids/clockwork.pid"
set :rails_env, ENV['rails_env'] || ''
namespace :clockwork do
You can’t perform that action at this time.