Skip to content

Instantly share code, notes, and snippets.

View simo97's full-sized avatar
🏠
Working from home

adonis simo simo97

🏠
Working from home
View GitHub Profile
function addDomNodes(nodeToAdd, nodeParentWhereNodeIsAdded, typeOfInsertion = "innerHtml"){
return new Promise((resolve) => {
requestAnimationFrame(() => {
typeOfInsertion === "innerHtml" ? nodeParentWhereNodeIsAdded.innerHTML = nodeToAdd : nodeParentWhereNodeIsAdded.insertAdjacentHTML('beforeend', nodeToAdd);
resolve(nodeParentWhereNodeIsAdded);
}, nodeParentWhereNodeIsAdded);
});
}
function removeDomNodes(domChildToRemove, domParent){
@simo97
simo97 / postgres-brew.md
Created June 24, 2019 14:29 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@simo97
simo97 / remote-git.md
Created May 24, 2019 13:38 — forked from Integralist/remote-git.md
Basic set-up of remote git repository on a standard server

Set-up remote git repository on a standard server

The first thing to do is to install Git on the remote server.

Once you do that the rest of the process is split into three sections:

  1. Server set-up
  2. Local set-up (push commits)
  3. Server (pull commits)
@simo97
simo97 / install virtualenv ubuntu 16.04.md
Created February 17, 2019 23:17 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
<?php
$db=mysqli_connect('localhost', 'root', '', 'crud');
function Saved(){
$name=$_POST['name'];
$address=$_POST['address'];
$query="INSERT INTO info (name, address) VALUES('$name', '$address')";
mysqli_query($db, $query);
header('location: index.php'); //redirection sur index page apres l'insertion
<!DOCTYPE html>
<html>
<head>
<!-- Importing Web Component's Polyfill -->
<script src="bower/platform/platform.js"></script>
<!-- Importing Custom Elements -->
<link rel="import" href="../src/image-object-tracking.html">
</head>
<body>
<!-- Using Custom Elements -->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>tracking.js - first tracking</title>
<script src="tracking-min.js"></script>
<!-- include dataset for each objet type -->
<script src="data/face.js"></script>
<script src="data/eye.js"></script>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>tracking.js - first tracking</title>
<script src="tracking-min.js"></script>
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
@simo97
simo97 / color_detection.html
Created January 27, 2019 18:47
Detect color into a video
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>tracking.js - first tracking</title>
<script src="tracking-min.js"></script>
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
TableName.objects.all().using('DB_NAME')
tableNameOject.save(using='DB_NAME')