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 'csv' | |
require 'json' | |
def parse file | |
return unless file | |
csv_array = [] | |
json_hash = JSON.parse(File.read( file, encoding: 'iso-8859-1' )) | |
json_hash.each do |mail, params| | |
csv_element = [] |
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
var google_map = {} | |
window.googleMapInitialize = function() { | |
var $map_address = $('#map-address'); | |
var map_options = { | |
zoom: 17, | |
}; | |
google_map = { |
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
import sys | |
import os | |
import time | |
import logging | |
import getopt | |
from watchdog.observers import Observer | |
from watchdog.events import LoggingEventHandler | |
from watchdog.events import FileSystemEventHandler | |
class CamelCaravan(FileSystemEventHandler): |
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
/* mixin for the big image gallery */ | |
@mixin big-image-breakpoint($screen_size) { | |
@if $screen_size == small_device { | |
@media (max-width: 620px) { | |
@content; | |
} | |
} | |
@else if $screen_size == tablet { | |
@media (min-width: 620px) and (max-width: 991px) { |
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
var mediaQueryListElement = window.matchMedia("all and (min-width: 666px)"); | |
function call_me(name) { | |
console.log("És um " + name); | |
mediaQueryListElement.removeListener(call_me.caller); | |
} | |
mediaQueryListElement.addListener(function() { | |
call_me("sugar"); | |
}); |
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
var mediaQueryListElement = window.matchMedia("all and (max-width: 990px)"); | |
function loadjQueryMobile() { | |
// listner to this callback very carefully, we should load this script only once | |
mediaQueryListElement.removeListener(loadjQueryMobile); | |
var helper_script = $('#holder-element').data('helper'); | |
if (helper_script) { | |
$.getScript(helper_script) |
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
begin; | |
savepoint insert_save_point; | |
insert into params values('email', 'lol@lol.pt'); | |
rollback to insert_save_point; | |
update params set value = 'lol@lol.pt' where name = 'email'; | |
commit; |
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
#seller-name { | |
color: #34495e; | |
&:hover { | |
cursor: help; | |
text-decoration: none; | |
} | |
/* pseudo element to put after our link */ | |
&:after { |
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
{ | |
"{": { | |
"\"request\":": {}, | |
"{": { | |
"\"type\":\"ship\",": {}, | |
"\"slug\":\"norwegian-breakaway\",": {}, | |
"\"api\":\"api\",": {}, | |
"\"key\":\"abc123\"": {}, | |
"\"object\":": {}, | |
"{": { |
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 CruisesCore | |
module Models | |
module Article | |
module Elasticsearch | |
extend ActiveSupport::Concern | |
included do | |
include ::Elasticsearch::Model | |
index_name "cruises-#{Rails.env}" |
OlderNewer