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
| namespace :app, defaults: {format: :json} do | |
| namespace :v1 do | |
| resource :pro, only: [:create, :show, :destroy] | |
| resource :application, only: [:show] do | |
| get :messages | |
| post :statistics | |
| post :configuration | |
| end | |
| resources :people, only: [:index, :create, :update, :destroy] | |
| resources :payloads, shallow: true, only: [:create, :destroy] do |
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
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <sys/wait.h> | |
| #include <curl/curl.h> | |
| #include <stdlib.h> | |
| // Compiled and ran via | |
| // $ clang -o bug bug.c -lcurl && ./bug | |
| void perform_https_req() { |
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
| require 'thread' | |
| class Sqewer::CallRecorder | |
| Call = Struct.new(:method_name, :args, :blk) | |
| NOOP = ->(*){} | |
| def initialize(proxying_to) | |
| @obj = proxying_to | |
| @mutex = Mutex.new | |
| @calls = [] |
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
| #!/usr/bin/env ruby | |
| require 'bundler' | |
| Bundler.setup | |
| require 'aws-sdk' | |
| require 'rb-fsevent' | |
| require 'terminal-notifier' | |
| require 'clipboard' | |
| # ENV['AWS_ACCESS_KEY_ID'] = # |
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
| set cut_paste_input [stack 0] | |
| version 7.0 v6 | |
| push $cut_paste_input | |
| push 0 | |
| Group { | |
| inputs 2 | |
| name JT_ExtractGrain | |
| selected true | |
| xpos 291 | |
| ypos -489 |
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
| exceptions = [] | |
| tree = {} | |
| ObjectSpace.each_object(Class) do |cls| | |
| next unless cls.ancestors.include? Exception | |
| next if exceptions.include? cls | |
| next if cls.superclass == SystemCallError # avoid dumping Errno's | |
| exceptions << cls | |
| cls.ancestors.delete_if {|e| [Object, Kernel].include? e }.reverse.inject(tree) {|memo,cls| memo[cls] ||= {}} | |
| 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
| Using worker: worker-linux-10-1.bb.travis-ci.org:travis-linux-17 | |
| system_info | |
| Build system information | |
| Build language: ruby | |
| Build image provisioning date and time | |
| Sun Dec 7 06:19:19 UTC 2014 | |
| lsb_release -a | |
| Distributor ID: Ubuntu | |
| Description: Ubuntu 12.04 LTS | |
| Release: 12.04 |
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
| /* | |
| Will unpremultiply the currently selected Photoshop layer | |
| */ | |
| var doc = app.activeDocument; | |
| // Duplicate this layer | |
| var premultLayer = app.activeDocument.activeLayer.duplicate(); | |
| premultLayer.blendMode = BlendMode.NORMAL; |
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
| require 'uri' | |
| module Julik | |
| module AbsolutizeHelper | |
| def canonicalize_hyperlinks(htmlcontent, root, host = nil, prot = nil) | |
| htmlcontent.gsub(/(<(img|a)\b[^>]*(src|href)=)(["'])(.*?)\4/) do | |
| md = $~ | |
| prefix = (host && prot) ? (prot + host) : '' | |
| prefix.gsub!(/\/$/, '') |
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
| # Make a little report :-) | |
| added_keys = preserved.keys - ENV.keys | |
| removed_keys = ENV.keys - preserved.keys | |
| changed_keys = preserved.keys.select{|k| ENV.keys.include?(k) }.select{|k| preserved[k] != ENV[k] } | |
| puts "Added to ENV and not removed #{added_keys.join(', ')}" if added_keys.any? | |
| puts "Removed from ENV and not re-added #{removed_keys.join(', ')}" if removed_keys.any? | |
| puts "Mutated in ENV and not reset #{changed_keys.join(', ')}" if changed_keys.any? |