Skip to content

Instantly share code, notes, and snippets.

Michael Shafrir mshafrir

Block or report user

Report or block mshafrir

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
View transactions.xml
<?xml version="1.0" encoding="UTF-8"?>
<fantasy_content xml:lang="en-US" yahoo:uri="http://fantasysports.yahooapis.com/fantasy/v2/league/380.l.173339/transactions" time="398.12207221985ms" copyright="Data provided by Yahoo! and STATS, LLC" refresh_rate="60" xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" xmlns="http://fantasysports.yahooapis.com/fantasy/v2/base.rng">
<league>
<league_key>380.l.173339</league_key>
<league_id>173339</league_id>
<name>US/NS</name>
<url>https://football.fantasysports.yahoo.com/f1/173339</url>
<logo_url>https://ct.yimg.com/cy/8363/29675221585_07d5103c7f_192sq.jpg?ct=fantasy</logo_url>
<draft_status>postdraft</draft_status>
<num_teams>12</num_teams>
View test.html
<html>
<head>
</head>
<body>
hello
<script>
var url = 'intent://example.com#Intent;scheme=https;end';
var win = window.open(url, '_blank');
win.focus();
</script>
View gist:ea9778f3a788879cea7b5fd3b99ae3f2
Verifying my Blockstack ID is secured with the address 16DdMxJHmxKLEC9QH1XXXGxGFGCZA4yMig https://explorer.blockstack.org/address/16DdMxJHmxKLEC9QH1XXXGxGFGCZA4yMig
@mshafrir
mshafrir / AndroidManifest.xml
Created Aug 1, 2017
BottomSheetDialogFragmentExample
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.twitter.bottomdialogfragmentexample">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
View keybase.md

Keybase proof

I hereby claim:

  • I am mshafrir on github.
  • I am mcs (https://keybase.io/mcs) on keybase.
  • I have a public key whose fingerprint is 74F3 7950 3BAA 0FC6 F105 3611 A561 1A24 C934 A38D

To claim this, I am signing this object:

View parse.rb
require 'csv'
out_rows = []
curr_row = []
CSV.foreach("csv.csv") do |row|
str = row.first
if str.start_with?('(PX')
out_rows << curr_row
curr_row = Array.new
View states_hash.json
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
@mshafrir
mshafrir / twilio_calls_controller.rb
Created Feb 9, 2012
Twilio Request Validation for Rails
View twilio_calls_controller.rb
class TwilioCallsController < ApplicationController
before_filter :authenticate_twilio_request, :only => [
:twilio_handling_method_1, :twilio_handling_method_2
]
def twilio_handling_method_1
# do something Twilio-related
end
def twilio_handling_method_2
@mshafrir
mshafrir / error._all.html
Created May 3, 2011
Bug in _.all method
View error._all.html
<!DOCTYPE html>
<html>
<head>
<script src="http://documentcloud.github.com/underscore/underscore.js"></script>
<script>
var validation = {
video: {
iphone4: false,
iphone3: false,
@mshafrir
mshafrir / closure_compiler_arguments.txt
Created Feb 8, 2011
Arguments for the Google Closure Compiler
View closure_compiler_arguments.txt
--charset VAL : Input and output charset for all files
. By default, we accept UTF-8 as input
and output US_ASCII
--closure_entry_point VAL : Entry points to the program. Must be g
oog.provide'd symbols. Any goog.provid
e'd symbols that are not a transitive
dependency of the entry points will be
removed. Files without goog.provides,
and their dependencies, will always b
e left in. If any entry points are spe
You can’t perform that action at this time.