This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import CoreData | |
class DBManager { | |
let appDel:AppDelegate; | |
let context:NSManagedObjectContext; | |
init(){ | |
self.appDel = UIApplication.sharedApplication().delegate as AppDelegate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/* | |
|-------------------------------------------------------------------------- | |
| Base Site URL | |
|-------------------------------------------------------------------------- | |
| | |
| URL to your CodeIgniter root. Typically this will be your base URL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["ctrl+b"], "command": "toggle_side_bar" }, | |
{ | |
"keys": ["ctrl+alt+left"], | |
"command": "set_layout", | |
"args": | |
{ | |
"cols": [0.0, 0.33, 1.0], | |
"rows": [0.0, 1.0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?= validation_errors(); ?> | |
<form action="<?= site_url("admin/login") ?>" method="post" class="form-signin well"> | |
<h2 class="form-signin-heading">Logga in</h2> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="#" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
<h3>Modal header</h3> | |
</div> | |
<div class="modal-body"> | |
<p>One fine body…</p> | |
</div> | |
<div class="modal-footer"> | |
<a href="#" class="btn">Close</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Password{ | |
//Number of times to rehash | |
private $rotations = 0 ; | |
function encrypt_password($password, $username){ | |
$salt = hash('sha256', uniqid(mt_rand(), true) . "somesalt" . strtolower($username)); |