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
ssh-keygen -t rsa -b 4096 | |
vagrant up | |
vagrant destroy | |
vagrant halt | |
vagrant debug | |
vagrant ssh |
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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ /index.php?/$1 [L] | |
For PHP version less than 5.2.6 try this: | |
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 | |
$n = ""; | |
if(isset($_POST['submit'])){ | |
$to = "coderssign@gmail.com"; // this is your Email address | |
$from = $_POST['email']; // this is the sender's Email address | |
$name = $_POST['name']; | |
$email = $_POST['email']; | |
$message = $name . " || " . $phone . " " . "\n\n" . $_POST['message']; | |
$message2 = "Here is a copy of your message " . $name . "\n\n" . $_POST['message']; |
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
1. Git init | |
2. Git config --global user.name “username” | |
3. Git config --global user.email “email” | |
4. Git config –global user.name ================check username | |
5. Git config –global user.email ================check email | |
6. Touch text.txt ===================to create file | |
7. Notepad text.txt ============to open in notepad | |
8. Git status ================check status(track/untrack) | |
9. Git add text.txt | |
10. Git add . ================add all files |
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 | |
/** | |
*Session Class | |
**/ | |
class Session{ | |
public static function init(){ | |
if (version_compare(phpversion(), '5.4.0', '<')) { | |
if (session_id() == '') { | |
session_start(); | |
} |
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 | |
/** | |
* Format Class | |
*/ | |
class Format{ | |
public function formatDate($date){ | |
return date('F j, Y, g:i a', strtotime($date)); | |
} | |
public function textShorten($text, $limit = 400){ |
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 | |
Class Database{ | |
public $host = DB_HOST; | |
public $user = DB_USER; | |
public $pass = DB_PASS; | |
public $dbname = DB_NAME; | |
public $link; | |
public $error; |
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 | |
define("DB_HOST", "localhost"); | |
define("DB_USER", "root"); | |
define("DB_PASS", ""); | |
define("DB_NAME", "your_db_name"); | |
?> |
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
<!-- Load TinyMCE --> | |
<script src="js/tiny-mce/jquery.tinymce.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
setupTinyMCE(); | |
setDatePicker('date-picker'); | |
$('input[type="checkbox"]').fancybutton(); | |
$('input[type="radio"]').fancybutton(); | |
}); | |
</script> |
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 include 'config/config.php';?> | |
<?php include 'lib/Database.php';?> | |
<?php include 'helpers/formet.php'; ?> | |
<?php include 'inc/header.php'; ?> | |
<?php include 'inc/slider.php'; ?> | |
<?php | |
$db= new Database(); | |
$fm= new Formet(); |