Skip to content

Instantly share code, notes, and snippets.

View itainathaniel's full-sized avatar
🏠
לֹא הַבַּיְשָׁן לָמֵד, וְלֹא הַקַּפְּדָן מְלַמֵּד

Itai Nathaniel itainathaniel

🏠
לֹא הַבַּיְשָׁן לָמֵד, וְלֹא הַקַּפְּדָן מְלַמֵּד
View GitHub Profile
@itainathaniel
itainathaniel / flightradar24
Created August 21, 2018 08:21
JS calculator of fleet size & age. You need to be a member, though
// go to https://www.flightradar24.com/data/airlines/<airliner>/fleet and run on console
const planes = [];
const tables = document.querySelectorAll('.table-condensed');
tables.forEach(table => {
let tbody = table.querySelector('tbody');
let trs = tbody.querySelectorAll('tr');
trs.forEach(tr => {
let age = parseInt(tr.querySelector('td:last-child').innerText, 10);
if (isNaN(age)) {
@itainathaniel
itainathaniel / headstart.php
Created June 28, 2015 19:45
This is how I "hacked" headstart.co.il
<?php
date_default_timezone_set('Asia/Jerusalem');
$oid = 201901;
$time = mktime(13, 58, 00, 06, 23, 15); // 1435062213
$tk = date('mdHis', $time); // 0623152333;
$url = 'https://www.headstart.co.il/checkout.aspx?oid='.$oid.'&success=true&na=1&tk='.$tk;
for ($i=0; $i<120; $i++,$time--) {
@itainathaniel
itainathaniel / laravel-css_inliner-hebrew-mail.html
Last active August 29, 2015 14:23
Laravel & Mail & CSS Inliner & Hebrew
### Laravel & Mail & Hebrew
So I needed to email myself reports from my Laravel 5.1 website, and since one cannot generate stylish HTML manually I needed a CSS inliner to do this automatically.
I came across <a href="https://github.com/tijsverkoyen/CssToInlineStyles">tijsverkoyen/CssToInlineStyles</a> and though "ok, i'm done" but I needed to conect this converter to a command in Laravel.
Then I googled a bit until I found [NightMICU](http://stackoverflow.com/questions/29661851/laravel-5-inline-css-in-email) and saw the code example:
```$data = ['someVar' => 'someValue'];
$inlineEmail = new inlineEmail('emails.group-email', $data);
$content = $inlineEmail->convert();
Mail::queue('emails.raw', ['content' => $content], function($message) use ($data) {
$message->subject('Hello World')
@itainathaniel
itainathaniel / index.php
Created June 30, 2014 12:13
An index.php file (a sublime-github plugin text)
<?php
require_once '../conf/conf.php';
echo 'Hello World';
?>