Skip to content

Instantly share code, notes, and snippets.

Avatar

Ilkka Oksanen ilkkao

View GitHub Profile
View Tesla softan ostosivu
1. Muuta autosi VIN numero base64 formaattiin
a. Käytä esimerkiksi työkalua osoitteessa http://www.utilities-online.info/base64/
b. Kirjoita autosi VIN vasempaan laatikkoon, tarkista että edessä tai jäljessä ei ole välilyöntejä
c. Klikkaa "encode -->" nappia
d. Kopioi tulos oikeasta laatikosta (esim. koodi '1234567890' base64 enkoodattuna on 'MTIzNDU2Nzg5MA=='
2. Kirjaudu sisään tesla.com:iin
3. Muokkaa osoiterivi käsin muotoon https://www.tesla.com/software_purchase_auth?vin=<koodattu VIN> ja
paina enter (Edellisen esimerkin tapauksessa lopullinen osoite olisi
https://www.tesla.com/software_purchase_auth?vin=MTIzNDU2Nzg5MA==)
View header.html.hbs
<div class="header-inner">
<div id="logo">
{{#link 'help_center'}}
<img src="{{logo_url}}" alt="{{t 'logo'}}">  
{{/link}}
</div>
{{#if alternative_locales}}
<div class="dropdown language-selector" aria-haspopup="true">
<a class="dropdown-toggle">
{{current_locale.name}}
View header.html.hbs
<div class="header-inner">
<div id="logo">
{{logo}}
</div>
<nav class="user-nav">
{{language_selector}}
</nav>
</div>
View keybase.md

Keybase proof

I hereby claim:

  • I am ilkkao on github.
  • I am ilkkao (https://keybase.io/ilkkao) on keybase.
  • I have a public key ASDGxcCsWn21WncTezuoCuJOQTX47mLu3VoZxmrrCHqgiQo

To claim this, I am signing this object:

View gist:476b525f3fcfa143a4f7
def compress(input)
previous_char = nil
current_count = 0
output = ""
input.each_char do |c|
if c == previous_char || previous_char == nil
current_count += 1
elsif previous_char != nil
output << "#{current_count}#{previous_char}"
@ilkkao
ilkkao / gist:10017252
Created Apr 7, 2014
Unexpected pending status
View gist:10017252
8", "build_number"=>2318, "result"=>"passed", "event"=>"build", "started_at"=>"2014-04-04T09:55:42Z", "finished_at"=>"2014-04-04T10:03:35Z", "commit"=>{"id"=>"3cac8509b885be15c6e03512a1ed4e85fa533af3",
8", "build_number"=>2318, "result"=>"passed", "event"=>"build", "started_at"=>"2014-04-04T09:55:42Z", "finished_at"=>"2014-04-04T10:03:35Z", "commit"=>{"id"=>"3cac8509b885be15c6e03512a1ed4e85fa533af3",
8", "build_number"=>2318, "result"=>"passed", "event"=>"build", "started_at"=>"2014-04-04T09:55:42Z", "finished_at"=>"2014-04-04T10:03:35Z", "commit"=>{"id"=>"3cac8509b885be15c6e03512a1ed4e85fa533af3",
9", "build_number"=>2319, "result"=>"passed", "event"=>"build", "started_at"=>"2014-04-04T10:32:20Z", "finished_at"=>"2014-04-04T10:40:12Z", "commit"=>{"id"=>"914859ee3a6598135a2755f7e617cdc9044523a2",
9", "build_number"=>2319, "result"=>"passed", "event"=>"build", "started_at"=>"2014-04-04T10:32:20Z", "finished_at"=>"2014-04-04T10:40:12Z", "commit"=>{"id"=>"914859ee3a6598135a2755f7e617cdc9044523a2",
9", "build_num
View gist:6125242
if (!defined($sec_cookie) || !defined($userid) || !exists($users{$userid}) ||
!exists($users{$userid}{"secret_cookie"}) ||
$sec_cookie ne $users{$userid}{"secret_cookie"} ||
$users{$userid}{"secret_cookie"} == 0)
{
my $expected = "undef";
$expected = $users{$userid}{"secret_cookie"} if (exists($users{$userid}{"secret_cookie"}));
$sec_cookie = "undef" if (!defined($sec_cookie));
$userid = "undef" if (!defined($userid));