Skip to content

Instantly share code, notes, and snippets.

View dcrystalj's full-sized avatar

Tomaz dcrystalj

View GitHub Profile
import imaplib
import StringIO
import rfc822
obj = imaplib.IMAP4_SSL("imap.gmail.com", "993")
obj.login("[email protected]", "pass")
print obj.list()
obj.select("[Gmail]/Vsa po&AWE-ta")
m = obj.search(None, "ALL")[1][0]
alli = m.split()
if (Session::has('user')) {
Auth::login(Session::get('user'));
}
else{
Session::put('user',Cookie::get('user'));
Auth::login(Cookie::get('user'));
}
@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']
@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 -->
<?php
class Provider extends BaseController {
//rules for registering
public $rules = array(
'sname' => 'required|max:20|alpha',
'email' => 'required|email|unique:users',
);
@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();
@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>
We couldn’t find that file to show.
@dcrystalj
dcrystalj / gist:5148535
Created March 13, 2013 01:02
PHP: test
We couldn’t find that file to show.