Skip to content

Instantly share code, notes, and snippets.

View dcrystalj's full-sized avatar

Tomaz dcrystalj

View GitHub Profile
@dcrystalj
dcrystalj / gist:5148535
Created March 13, 2013 01:02
PHP: test
We couldn’t find that file to show.
We couldn’t find that file to show.
@dcrystalj
dcrystalj / laravel-blade.tmLanguage
Created March 21, 2013 19:38
XML: laravel-blade temp fix for syntax highlight in sublime between {{ }}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>blade</string>
<string>blade.php</string>
</array>
<key>name</key>
@dcrystalj
dcrystalj / hello.blade.php
Created March 25, 2013 16:12
former simple form example
<?php
//view get_test.php
Former::text('name')->class('myclass')->autofocus(),
Former::text('surname')->class('myclass'),
Former::password('password'),
Former::actions()->submit('Submit'),
Former::close();
<?php
class Provider extends BaseController {
//rules for registering
public $rules = array(
'sname' => 'required|max:20|alpha',
'email' => 'required|email|unique:users',
);
@dcrystalj
dcrystalj / test
Created April 14, 2013 11:53
matija
<div id="event-dialog" class="modal hide fade">
<!-- dialog contents -->
<div class="modal-body">
From: <input type="time" placeholder="08:00" id="efrom" /><br />
To: &nbsp;&nbsp;&nbsp;&nbsp;<input type="time" placeholder="16:00" id="eto" />
</div>
<!-- dialog buttons -->
@dcrystalj
dcrystalj / zip slovenia
Created April 14, 2013 13:09
zip slovenia
['zip'=>'1000', 'name'=> 'Ljubljana']
['zip'=>'1001', 'name'=> 'Ljubljana - P.P.']
['zip'=>'1210', 'name'=> 'Ljubljana - Šentvid']
['zip'=>'1211', 'name'=> 'Ljubljana - Šmartno']
['zip'=>'1215', 'name'=> 'Medvode']
['zip'=>'1216', 'name'=> 'Smlednik']
['zip'=>'1217', 'name'=> 'Vodice']
['zip'=>'1218', 'name'=> 'Komenda']
['zip'=>'1219', 'name'=> 'Laze v Tuhinju']
['zip'=>'1221', 'name'=> 'Motnik']
if (Session::has('user')) {
Auth::login(Session::get('user'));
}
else{
Session::put('user',Cookie::get('user'));
Auth::login(Cookie::get('user'));
}
import imaplib
import StringIO
import rfc822
obj = imaplib.IMAP4_SSL("imap.gmail.com", "993")
obj.login("xxx@gmail.com", "pass")
print obj.list()
obj.select("[Gmail]/Vsa po&AWE-ta")
m = obj.search(None, "ALL")[1][0]
alli = m.split()
Provider registration
Ob napaki email ze obstaja predlagam da uporabniki to javite in mu odprete login screen z vnesenim email naslovom. V primeru da ob registraciji vnesem prekratko geslo je bolje povedati uporabniku da ima sibko geslo kot ga prisiliti davnese od 4 do 20 mest za geslo.
User registration
Enako ter se
Tu je geslo do 30.
Realno je da uporabnik pozabi da je registriran in se skusa registrirati ponovno. Izbira casovne cone je nejasna. Je samo utc ter razlika.
Jezik se lahko privzeto za uporabnike iz slo nastavi na slovensko.