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
-- Mail-merge script | |
-- Assembled by John Wickerson (using various parts pasted from the internet, credited individually below) in April 2021. | |
-- Instructions: | |
---- 1. Select a message in Mail (probably one that has been saved as a Draft) and then run this script. | |
---- 2. The script will ask you for a CSV file containing the data to be mail-merged. The first column of this CSV file must be named "email". | |
---- 3. The script will substitute $FOO in the contents of the message with the contents of column FOO in the CSV file. | |
---- 4. Any to/cc/bcc recipients in the original message will be preserved. | |
---- 5. Unfortunately, any attachments in the original message are not preserved, but if you want an attachment, you can add it | |
---- using this script by uncommenting one of the lines below. |
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
Future-proofing your code : https://www.oreilly.com/ideas/future-proof-and-scale-proof-your-code | |
Basic Introduction / Step by step : https://www.talend.com/blog/2018/04/23/how-to-develop-a-data-processing-job-using-apache-beam/ | |
Credits: | |
https://docs.google.com/presentation/d/17eq17-4KYvF1-2sCOo0sSUdm6gj4h6sWLhLDUYOe1cU/edit#slide=id.g11fb502606_9_111 | |
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
$dig repo.zoomdata.com | |
; <<>> DiG 9.8.3-P1 <<>> repo.zoomdata.com | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6976 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;repo.zoomdata.com. IN A |
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
<?php | |
$root = $_SERVER['DOCUMENT_ROOT']; | |
chdir($root); | |
$path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/'); | |
set_include_path(get_include_path().':'.__DIR__); | |
if(file_exists($root.$path)) | |
{ | |
if(is_dir($root.$path) && substr($path,strlen($path) - 1, 1) !== '/') | |
$path = rtrim($path,'/').'/index.php'; |
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
s3cmd get s3://bucket - | hadoop fs -copyFromLocal - /hdfs_location |
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
web: ruby dyno_process_analyse.rb -p $PORT | |
worker: ruby dyno_process_analyse.rb -p $PORT |
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/ruby | |
result = `/usr/bin/osascript <<EOT | |
tell application "Terminal" | |
activate | |
set Input to display dialog "Enter Text:" with title "Hello" with icon 0 default answer "" buttons {"OK"} default button 1 | |
return text returned of Input as string | |
end tell | |
EOT | |
` |
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 d = document.createElement("SCRIPT"); | |
d.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"; | |
document.body.appendChild(d); | |
alert("Ready to go to viki.com!"); | |
$('a.photo')[0].setAttribute("href","http://www.youtube.com/watch?v=NVh4OjSKk4g&feature=topvideos_mfh") | |
$('a.photo')[0].click(); |
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 d = document.createElement("SCRIPT"); | |
d.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"; | |
document.body.appendChild(d); | |
$('a.photo')[0].setAttribute("href","http://www.viki.com/channels/3303-dr-g-y-las-mujeres/videos/35579/1") | |
$('a.photo')[0].click(); |
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 checkout 76a62f50f5831fe8be17ef6fa4e3e3e6d4dc3cbd (working old commit) | |
$ script/console | |
Loading development environment (Rails 2.3.2) | |
>> service_ads = ServiceAd.paginate :page => 1, :per_page => 6, :order=>'created_at DESC' | |
=> [] | |
>> service_ads.class | |
=> WillPaginate::Collection | |
$ git checkout bae6edc759de3faf147f9f21a1e1ae6168c0ae49 (buggy current commit) |
NewerOlder