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
"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": { |
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
grep -rl 'windows' ./ | xargs sed -i 's/windows/linux/g' |
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
# git repo status in prompt functions | |
# ripped from <https://github.com/twolfson/sexy-bash-prompt/blob/master/.bash_prompt> | |
# with small changes | |
# | |
function _get_git_branch() { | |
# On branches, this will return the branch name | |
# On non-branches, (no branch) | |
_REF="$(git symbolic-ref HEAD 2> /dev/null | sed -e 's/refs\/heads\///')" | |
if [[ $_REF != "" ]]; then | |
echo $_REF |
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
[{:channel_id=>"RNLRC-T16O0F1OEWt5LWfA", :data=>[{"date"=>"2015-01-02", "total"=>0, "value"=>0}, {"date"=>"2015-01-03", "total"=>0, "value"=>0}, {"date"=>"2015-01-04", "total"=>0, "value"=>0}, {"date"=>"2015-01-05", "total"=>0, "value"=>0}, {"date"=>"2015-01-06", "total"=>0, "value"=>0}, {"date"=>"2015-01-07", "total"=>0, "value"=>0}, {"date"=>"2015-01-08", "total"=>0, "value"=>0}, {"date"=>"2015-01-09", "total"=>0, "value"=>0}, {"date"=>"2015-01-10", "total"=>0, "value"=>0}, {"date"=>"2015-01-11", "total"=>0, "value"=>0}, {"date"=>"2015-01-12", "total"=>0, "value"=>0}, {"date"=>"2015-01-13", "total"=>0, "value"=>0}, {"date"=>"2015-01-14", "total"=>0, "value"=>0}, {"date"=>"2015-01-15", "total"=>0, "value"=>0}, {"date"=>"2015-01-16", "total"=>0, "value"=>0}, {"date"=>"2015-01-17", "total"=>0, "value"=>0}, {"date"=>"2015-01-18", "total"=>0, "value"=>0}, {"date"=>"2015-01-19", "total"=>0, "value"=>0}, {"date"=>"2015-01-20", "total"=>0, "value"=>0}, {"date"=>"2015-01-21", "total"=>0, "value"=>0}, {"date"=>"2015- |
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
<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> | |
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
- if @track_saved_profile_form_data | |
%img{ src: "https://panel.adkompan.com/track_lead/50/ipz" } |
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
mixpanel.register_once({ | |
"initial referrer": document.referrer | |
}); | |
- if user_signed_in? | |
:javascript | |
mixpanel.identify(#{current_user.try(:id)}); | |
mixpanel.register_once({ |
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
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 |
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
def _save_to_database(frame, table_name): | |
frame.toDF().write.format("jdbc").mode('overwrite')\ | |
.option("url", "jdbc:postgresql://{}:5432/{}".format(args['db_host'],args['db_name'])) \ | |
.option("user", args['db_user']).option("password", args['db_password'])\ | |
.option("truncate", "true") \ | |
.option("dbtable", table_name).save() |
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
## @params: [JOB_NAME] | |
args = getResolvedOptions(sys.argv, | |
['JOB_NAME', | |
'db_name', | |
'db_user', | |
'db_password', | |
'db_host']) |
OlderNewer