Skip to content

Instantly share code, notes, and snippets.

View karol-blaszczyk's full-sized avatar
🎯
Focusing

Karol Błaszczyk karol-blaszczyk

🎯
Focusing
View GitHub Profile
grep -rl 'windows' ./ | xargs sed -i 's/windows/linux/g'
"snippet": {
"publishedAt": "2005-11-01T06:05:35.000Z",
"channelId": "UCjBp_7RuDBUYbd1LegWEJ8g",
"title": "xbox",
"description": "Get all of your Xbox 360, Xbox LIVE and Kinect videos here, plus videos of your favorite games like Halo 4, Gears of War Judgment, Dance Central 3, and more!",
"thumbnails": {
"default": {
"url": "https://lh5.googleusercontent.com/-z-x2jzO6vKc/AAAAAAAAAAI/AAAAAAAAAAA/BoqdJG4hzdI/photo.jpg"
},
"medium": {
@karol-blaszczyk
karol-blaszczyk / gist:8332124
Created January 9, 2014 10:19
Localization
def self.search_pricings_for(service_ids, postal_code)
pcc = PostalCodeCoordinates.find_by_postal_code(postal_code) if postal_code
lat_lon = pcc.lat_lon_string if pcc
unless pcc
search = Tire.search do |search|
search.size 0
end
return search
end
@karol-blaszczyk
karol-blaszczyk / Mixpanel
Last active December 31, 2015 01:59
Mixpanel
mixpanel.register_once({
"initial referrer": document.referrer
});
- if user_signed_in?
:javascript
mixpanel.identify(#{current_user.try(:id)});
mixpanel.register_once({
@karol-blaszczyk
karol-blaszczyk / Adkompan
Last active December 30, 2015 20:29
Cookie tracking
- if @track_saved_profile_form_data
%img{ src: "https://panel.adkompan.com/track_lead/50/ipz" }
<VirtualHost *:80>
ServerName social44.com
ServerAlias social44.com www.social44.com
RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</VirtualHost>