This file contains 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
❷ > QUEUE=* rake resque:work --trace | |
** Invoke resque:work (first_time) | |
** Invoke resque:preload (first_time) | |
** Invoke resque:setup (first_time) | |
** Execute resque:setup | |
** Execute resque:preload | |
rake aborted! | |
No such file to load -- devise/confirmations_controller | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:306:in `rescue in depend_on' | |
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:301:in `depend_on' |
This file contains 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 gh --description 'Open the webpage for the current github repo/branch' | |
set -l fetch_url (command git remote --verbose show -n origin ^/dev/null | command grep Fetch | cut -c 14- ) | |
#did we get an exit status? | |
if [ $status -gt 0 ] | |
echo 'Not a git repo.' | |
return 1 | |
end | |
if [ -z $fetch_url ] |
This file contains 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
#include <stdio.h> | |
#include <uv.h> | |
static void on_close(uv_handle_t* handle); | |
static void on_connect(uv_connect_t* req, int status); | |
static void on_write(uv_write_t* req, int status); | |
static uv_loop_t *loop; | |
static uv_buf_t alloc_cb(uv_handle_t* handle, size_t size) { |
This file contains 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
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
bind | split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % |
This file contains 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
diff --git a/app/features-json/middleware/jwt_auth.rb b/app/features-json/middleware/jwt_auth.rb | |
index e6c1f15..9d0e1a1 100644 | |
--- a/app/features-json/middleware/jwt_auth.rb | |
+++ b/app/features-json/middleware/jwt_auth.rb | |
@@ -5,14 +5,19 @@ require "jwt" | |
module FastlaneCI | |
# API Middleware responsible of authenticate all the requests that uses it. | |
class JwtAuth | |
- def initialize(app) | |
+ def initialize(app, encryption_key=nil) |
This file contains 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
require 'zlib' | |
## | |
# This is a simple PNG decoder, inspired and adapted from ChunkyPNG | |
class PNG | |
SIGNATURE = [137, 80, 78, 71, 13, 10, 26, 10].pack('C8').force_encoding('BINARY') | |
attr_reader :width, :height, :depth, :color, :compression, :filtering, :interlace | |
## |
This file contains 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
<html> | |
<head> | |
<script src="https://jsconsole.com/js/remote.js?snatchev"></script> | |
</head> | |
<body> | |
@snatchev | |
</body> | |
</html> |
This file contains 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
class SafariApnController < ApplicationController | |
# When a user allows permission to receive push notifications, a POST request is sent to the following URL: | |
# webServiceURL/version/pushPackages/websitePushID | |
# post '/:version/pushPackages/:website_push_id' => 'safari_apn#package' | |
def package | |
#return the push package | |
send_file(File.join(Rails.root, 'public', 'pushPackage.zip'), type: 'application/zip', disposition: 'inline') | |
end |
This file contains 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::Application.routes.draw do | |
def api_endpoints | |
controller :api do | |
resources :widget | |
post :register | |
get :help | |
end | |
end | |
This file contains 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
class RingBuffer < Array | |
attr_reader :max_size | |
def initialize(max_size, enum = nil) | |
@max_size = max_size | |
enum.each { |e| self << e } if enum | |
end | |
def <<(el) | |
if @max_size && self.size >= @max_size |
NewerOlder