Skip to content

Instantly share code, notes, and snippets.

View arielallon's full-sized avatar
🙊

Ariel Allon arielallon

🙊
View GitHub Profile
@arielallon
arielallon / get_metadata.sh
Created January 18, 2022 16:34 — forked from rlcarrca/get_metadata.sh
RETS server connectivity via curl
curl \
--digest \
--user-agent "MyCurlClient/1.0" \
-o data/metadata.xml \
--show-error \
--dump-header data/headers.txt \
-u "username:password" \
--header "RETS-Version: RETS/1.5" \
--cookie-jar data/cookies.txt \
--cookie data/cookies.txt \
@arielallon
arielallon / ya-print.css
Created April 24, 2020 21:41
Yediot Ahronot Print css
#ya-topdate {
display:none;
}
#ya-header-logo {
display:none;
}
.ExternalWebpageIframeResp {
display:none;
@arielallon
arielallon / falseytest.php
Created December 5, 2017 17:08
Loose comparison of falsey types
<?php
$falsey = [
0,
'',
'0',
null,
false,
[],
];
<?php
function wasteMemory($redis, $runs, $multi=false, $echoEvery=10000) {
if ($multi) {
$redis->multi();
}
for ($i=0; $i <= $runs; $i++) {
$redis->set('key'.$i, 'value'.$i);
if ($i % $echoEvery === 0) {
echo memory_get_peak_usage();
echo "\n";
from scapy.all import *
import requests
import time
MAGIC_FORM_URL = 'http://put-your-url-here'
def record_poop():
data = {
"Timestamp": time.strftime("%Y-%m-%d %H:%M"),
"Measurement": 'Poopy Diaper'
}
@arielallon
arielallon / create-local-branches.sh
Created July 29, 2015 15:22
Migrate branches and tags to git from svn when using Atlassian's scripts
for branch in `git branch -r | grep "origin/[^tags|master|trunk]" | sed 's/ origin\///'`; do
git branch $branch remotes/origin/$branch
done
@arielallon
arielallon / feedly.opml
Last active August 29, 2015 14:18
Ariel's Feedly
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Ariel subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="science-y" title="science-y">
<outline type="rss" text="FiveThirtyEightFiveThirtyEight | Fe..." title="FiveThirtyEightFiveThirtyEight | Fe..." xmlUrl="http://fivethirtyeight.com/features/feed/" htmlUrl="http://fivethirtyeight.com"/>
<outline type="rss" text="Nautilus" title="Nautilus" xmlUrl="http://nautil.us/rss/all" htmlUrl="http://nautil.us/rss/all"/>
http://stackoverflow.com/a/25903802/1200542
@arielallon
arielallon / jpg-to-pdf.sh
Created February 24, 2015 04:11
Convert a bunch of jpgs to a paged pdf with the filenames watermarked on
convert *.jpg -gravity north -pointsize 15 -fill white -annotate 0 "%f" output.pdf