This file contains hidden or 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
| // Sublime Text 3 License Keys // | |
| Sublime Text 2.x (for all Builds) | |
| —– BEGIN LICENSE —– | |
| Andrew Weber | |
| Single User License | |
| EA7E-855605 | |
| 813A03DD 5E4AD9E6 6C0EEB94 BC99798F | |
| 942194A6 02396E98 E62C9979 4BB979FE | |
| 91424C9D A45400BF F6747D88 2FB88078 |
This file contains hidden or 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
| function InsertOrNot($BD){ // Permet de savoir si oui ou non, un truc a ete inserer dans la base de donnees ou pas! | |
| $stmt = $BD->query("SELECT LAST_INSERT_ID()"); | |
| $lastId = $stmt->fetch(PDO::FETCH_NUM); | |
| $lastId = $lastId[0]; | |
| if($lastId>0){ | |
| echo "<center><i class=\"green\"><i class=\"fa fa-check\"></i> Opération éffectuée<i></center>"; | |
| }else{ | |
| echo "<center><i class=\"red\"><i class=\"fa fa-times\"></i>Erreur détectée<i></center>"; | |
| } |
This file contains hidden or 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(isset($_REQUEST['src'])){ | |
| $file_name = $_REQUEST['src']; | |
| header('Content-Type: application/octet-stream'); | |
| header("Content-Transfer-Encoding: Binary"); | |
| header("Content-disposition: attachment; filename=\"".$file_name."\""); | |
| readfile('../Your_Path_Here/'.$file_name); | |
| exit; | |
| } | |
| ?> |
This file contains hidden or 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
| function myJQueryCode() { | |
| //Do stuff with jQuery | |
| } | |
| if(typeof jQuery=='undefined') { | |
| var headTag = document.getElementsByTagName("head")[0]; | |
| var jqTag = document.createElement('script'); | |
| jqTag.type = 'text/javascript'; | |
| jqTag.src = 'jquery.js'; | |
| jqTag.onload = myJQueryCode; |
This file contains hidden or 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 | |
| $convert = '5000'; // days you want to convert | |
| $years = ($convert / 365) ; // days / 365 days | |
| $years = floor($years); // Remove all decimals | |
| $month = ($convert % 365) / 30.5; // I choose 30.5 for Month (30,31) ;) | |
| $month = floor($month); // Remove all decimals | |
| $days = ($convert % 365) % 30.5; // the rest of days |
This file contains hidden or 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 | |
| /** | |
| * Ensures an ip address is both a valid IP and does not fall within | |
| * a private network range. | |
| */ | |
| function validate_ip($ip) | |
| { | |
| if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) { | |
| return false; | |
| } |
This file contains hidden or 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
| .top-box | |
| { | |
| box-shadow: inset 0 7px 9px -7px rgba(0,0,0,0.4); | |
| } | |
| .left-box | |
| { | |
| box-shadow: inset 7px 0 9px -7px rgba(0,0,0,0.4); | |
| } | |
| .right-box | |
| { |
This file contains hidden or 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
| #!/usr/bin/ruby | |
| ## Count to 50 | |
| 1.upto(50) {|n| puts n} | |
| ## Count Down to 1 | |
| 50.downto(1) {|n| puts n} | |
| ## Count to 20 | |
| (1..20).each {|n| puts n} |
This file contains hidden or 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
| <!-- For a friend D Dark Burning, just copy the block you need, i don't ever test this brick of code but it's work --> | |
| <div class="col-md-3"> | |
| <center> | |
| <img id="blah" src="../site/images/product_default.png" alt="Image du produit" style="width: 100%;max-height: 97px;" /> | |
| <input type="button" value="Changer l'image" class="btn btn-default" id="addImage" onclick="addImage()"> | |
| <input type="file" id="imgInp" name="img" required="required" class="form-control col-md-9 col-xs-12" required="" style="display: none;" onchange="readURL(this,'blah');"/> | |
| </center> | |
| </div> | |
| <div class="col-md-9"> |
This file contains hidden or 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
| <h1>CSS Directional Tooltips</h1> | |
| <div class="demo"> | |
| <p>Data attribute only <a href="#" data-tooltip="I’m the tooltip text">Tooltip</a></p> | |
| <p><code>.tooltip</code> <a href="#" class="tooltip" data-tooltip="I’m the tooltip text.">Tooltip</a></p> | |
| <p><code>.tooltip-top</code> <a href="#" class="tooltip-top" data-tooltip="I’m the tooltip text.">Tooltip</a></p> | |
| <p><code>.tooltip-right</code> <a href="#" class="tooltip-right" data-tooltip="I’m the tooltip text.">Tooltip</a></p> | |
| <p><code>.tooltip-bottom</code> <a href="#" class="tooltip-bottom" data-tooltip="I’m the tooltip text.">Tooltip</a></p> | |
| <p><a href="#" class="tooltip-left" data-tooltip="I’m the tooltip text.">Tooltip</a> <code>.tooltip-left</code></p> |