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
tell application "Firefox" | |
activate | |
tell application "System Events" to keystroke "r" using command down | |
tell application "Terminal" to activate | |
end tell |
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 -*- | |
import json | |
import requests | |
import urllib | |
from urllib import urlopen | |
import codecs | |
import time | |
url = u"http://maps.googleapis.com/maps/api/geocode/json?address={0}&sensor=false" |
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
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style type="text/css"> | |
ul.nav li | |
{ | |
display: block; | |
padding: 3px; |
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
#!/usr/bin/env python | |
from datetime import datetime | |
from urllib import urlopen | |
from lxml.html import fromstring | |
class Prevision(object): | |
def __init__(self): | |
return |
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
curl --silent http://text.www.weatheroffice.gc.ca/canada_f.html?Day=3#mapTop | | |
iconv -f ISO-8859-1 -t UTF-8 | | |
grep Montr | | |
sed -e 's/<[^>]*>/ /g' -e 's/ / /g' -e 's/^ //g' -e 's/°/°/g' -e 's/Montréal /Demain:/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
curl --silent "http://texte.www.meteo.gc.ca/rss/city/qc-147_f.xml" | iconv -f ISO-8859-1 -t UTF-8 | grep "Conditions actuelles:" | | |
sed -e 's/Conditions actuelles: //' -e 's/ <title>//' -e 's/<\/title>//' -e 's/°/°/' |
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
curl --silent "http://texte.www.meteo.gc.ca/rss/city/qc-147_f.xml" | grep "Conditions actuelles:" | | |
sed -e 's/Conditions actuelles: //' -e 's/ <title>//' -e 's/<\/title>//' -e 's/°/°/' |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
page = Nokogiri::HTML(open('http://texte.www.meteo.gc.ca/forecast/city_f.html?qc-147&unit=m')) | |
cond = "" |
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
#!/bin/sh | |
cd ~/Downloads/ | |
#Images: | |
mv *.png IMG/ | |
mv *.PNG IMG/ | |
mv *.jpg IMG/ | |
mv *.JPG IMG/ | |
mv *.tiff IMG/ | |
mv *.gif IMG/ | |
mv *.gif IMG/ |