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
module Jekyll | |
class Youtube < Liquid::Tag | |
@width = 640 | |
@height = 390 | |
def initialize(name, id, tokens) | |
super | |
@id = id | |
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
#coding: utf-8 | |
require 'wombat' | |
class BahtsoldCrawler | |
include Wombat::Crawler | |
base_url "http://www.bahtsold.com" | |
path "/en/results?category=7&ad_type=NULL&ar1=1006&c1=377&c2=NULL&6=NULL&price=2&co=Thailand-1" | |
document_format :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
# List of environments and their heroku git remotes | |
ENVIRONMENTS = { | |
:staging => 'myapp-staging', | |
:production => 'myapp-production' | |
} | |
namespace :deploy do | |
ENVIRONMENTS.keys.each do |env| | |
desc "Deploy to #{env}" | |
task env do |
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
# read here: http://blog.iempire.ru/2015/10/13/profiling-specs/ | |
RSpec.configure do |config| | |
config.around(:each) do |example| | |
path = Rails.root.join("tmp/stackprof-cpu-test-#{example.full_description.parameterize}.dump") | |
StackProf.run(mode: :cpu, out: path.to_s) do | |
example.run | |
end | |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="AntConfiguration"> | |
<defaultAnt bundledAnt="true" /> | |
</component> | |
</project> | |
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
<?xml version="1.0" encoding="utf-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>My feedly feeds</title> | |
</head> | |
<body> | |
<outline text="android"> | |
<outline text="Android-er" htmlUrl="http://android-er.blogspot.com/" type="rss" xmlUrl="http://feeds.feedburner.com/Android-er?format=xml"/> | |
</outline> |
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
package ee.era.geek.sms_spammer.service; | |
import android.app.Service; | |
import android.content.Intent; | |
import android.os.*; | |
import android.telephony.SmsManager; | |
import android.text.format.DateFormat; | |
import android.util.Log; | |
import ee.era.geek.sms_spammer.ConfigUtil; |
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 QuestionType | |
## This is a class to avoid database lookup for survey_question_types table | |
## replicate actual table : | |
# id => :name | |
DATA = { | |
3 => 'Rank order', | |
4 => 'Constant sum', | |
5 => 'Drop-down menu', | |
6 => 'Numeric Freeform Input', | |
7 => 'Comment Box', |
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 'ostruct' | |
require 'benchmark' | |
require 'values' | |
COUNT = 10_000_000 | |
NAME = "Test Name" | |
EMAIL = "test@example.org" | |
class Person | |
attr_accessor :name, :email |
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
source 'https://rubygems.org' | |
ruby '2.4' | |
gem 'benchmark-ips' |