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
#basics: | |
rails console | |
rails server | |
rake | |
rails generate | |
rails dbconsole | |
rails new app_name | |
#create scaffold | |
rails generate scaffold level |
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="elementToprint"> | |
Text to be in the PDF, simple function create by Sanix darker!!! | |
</div> | |
<input type="button" value="IMPRIME" onclick="PrintElem('elementToprint');"> | |
<script type="text/javascript"> | |
function PrintElem(elem) | |
{ | |
var mywindow = window.open('', 'PRINT', 'height=400,width=600'); |
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
rails generate migration AddPartNumberToProducts part_number:string |
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
Github credentials: Control Panel\User Accounts and Family Safety\Credential Manager | |
Then click on Windows Credentials |
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
function merge(obj1,obj2){ // Our merge function | |
var result = {}; // return result | |
for(var i in obj1){ // for every property in obj1 | |
if((i in obj2) && (typeof obj1[i] === "object") && (i !== null)){ | |
result[i] = merge(obj1[i],obj2[i]); // if it's an object, merge | |
}else{ | |
result[i] = obj1[i]; // add it to result | |
} | |
} | |
for(i in obj2){ // add the remaining properties from object 2 |
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
$stmt = $BD->query("SELECT LAST_INSERT_ID()"); | |
$lastId = $stmt->fetch(PDO::FETCH_NUM); | |
$lastId = $lastId[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
<?php | |
// Configure your keys (secret, piblic): https://www.google.com/recaptcha | |
$siteKey = 'XXXXXXXXXXXXXXXXXXXXXX'; // votre clé publique | |
?> | |
<form action="submit.php"> | |
.... | |
<div class="g-recaptcha" id="Optional-id"></div> | |
</form> | |
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script> | |
<script type="text/javascript" charset="utf-8"> |
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
<!DOCTYPE html> | |
<html > | |
<head> | |
<meta charset="UTF-8"> | |
<title>External URLs</title> | |
</head> | |
<body> | |
<ion-view title="Test Page"> | |
<ion-content> |
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
Class PANDA_decode { | |
var $PANDA_TR = - 1; | |
var $PANDA_TG = - 1; | |
var $PANDA_TB = - 1; | |
var $PANDA_TI = 0; | |
var $PANDA_buffer = Array(); | |
var $PANDA_arrays = Array(); | |
var $PANDA_delays = Array(); | |
var $PANDA_dispos = Array(); | |
var $PANDA_stream = ""; |
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
from os import path as ospath | |
from sys import path as syspath | |
# moving the path outside of the current dir | |
syspath.insert(1, ospath.join(syspath[0], '..')) | |
import module | |
# Or just in a specific parent directory in the sup folder: | |
# import sys | |
# sys.path.insert(0, '../module/') |