Skip to content

Instantly share code, notes, and snippets.

View refriedchicken's full-sized avatar

Mike Benner refriedchicken

View GitHub Profile
@refriedchicken
refriedchicken / winHTTP
Created June 7, 2012 01:20
WinHTTP (VBA Excel)
Option Explicit
Function GetDataFromURL()
Dim lngTimeout
Dim strUserAgentString
Dim intSslErrorIgnoreFlags
Dim blnEnableRedirects
Dim blnEnableHttpsToHttpRedirects
Dim strHostOverride
Dim strLogin
@refriedchicken
refriedchicken / stream_test.ex
Created February 22, 2017 19:03
Streaming Size Check
defmodule StreamTest do
use GenServer
def start_link(opts \\ []) do
GenServer.start_link(__MODULE__, :ok, opts)
end
def init(:ok) do
#url = "http://www.thinkbroadband.com/download/"
#url = "http://download.thinkbroadband.com/5MB.zip"
@refriedchicken
refriedchicken / sdl_controllers.txt
Created June 21, 2016 00:14
SDL Controller File for PS4
050000004c050000c405000000010000,PS4 Controller (Bluetooth),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
@refriedchicken
refriedchicken / google_serp.json
Last active March 4, 2016 14:15
Google Serp
{
// Partner API created fields. These are generated by us. Are not releated to the serp, but are relevant to the request, your account and the system in general
"get_count": 1, // your current get count, unrelated to the serp
"_id": "535a94b520b8fd64af000014", // authoritylabs id
"rank_date": "2014-04-25", // date crawl was requested
"requested_at": "2014-04-25T16:57:11+00:00", // timestamp of the request
"s3_key": "", // if using s3 to store a copy this is the key for your bucket
"data_center": "us", // requested data center (this option is no longer available)
//POST specific data. These are the attributes you sent with the post (or the defaults if none are sent in)
@refriedchicken
refriedchicken / bing-papi-locales.json
Created April 11, 2012 20:52 — forked from authoritylabs/bing-papi-locales.json
AuthorityLabs Supported Bing Partner API Locales
{
"locales": {
"tl-ph": {
"tld": "",
"description": ""
},
"nl-be": {
"tld": "be",
"description": "Belgium - Dutch"
},
require(File.join(File.dirname(__FILE__), '../../../../../', "config", "boot"))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
# require 'tasks/rails'
# Gives us the ability to remove the default rake tasks before overriding
# them with our own commands
Rake::TaskManager.class_eval do
def remove_task(task_name)
1. add this to your gem file
gem 'authlogic', :git => 'git://github.com/odorcicd/authlogic.git', :branch => 'rails3'
2. then run bundle install at the command line
3. finally you can run this install of script/generate session user_session
rails g authlogic:session user_session
def update_maps_key
a_config = YAML.load_file "#{RAILS_ROOT}/config/gmaps_api_key.yml"
a_config["production"].merge!({self.domain_name => self.key})
File.open("#{RAILS_ROOT}/config/gmaps_api_key.yml", 'w') { |f| YAML.dump(a_config, f) }
end
---
production:
houstonartgalleries.com: !str
str: asfgasfg
"@_rails_html_safe": false
thepochisuperstarmegashow.com: ABQIAAAAzMUFFnT9uH0Sfg76Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDmlRT6e90j135zat56yhJKQlWnkaidDIQ
example.com: ABQIAAAAzMUFFnT9uH0Sfg98Y4kbhGFJQa0g3IQ9GZqIMmInSLrthJKGDmlRT98f4j135zat56yjRKQlWnkmod3TB
development: ABQIAAAAzMUFFnT9uH0xq39J0Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDKaBR6j135zrztfTGVOm2QlWnkaidDIQ
test: ABQIAAAAzMUFFnT9uH0xq39J0Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDKaBR6j135zrztfTGVOm2QlWnkaidDIQ
@refriedchicken
refriedchicken / gist:ff2542225bc2a21eeed7
Created June 23, 2015 16:53
AuthorityLabs Web Insight JSON
{
_id: "55898a0f27ba831a7f000001",
date_created: "2015-06-23",
redirects: [
{
url: "http://authoritylabs.com/",
status_code: "200"
}
],
results: {