Skip to content

Instantly share code, notes, and snippets.

View SarahBourgeois's full-sized avatar

Sarah BOURGEOIS SarahBourgeois

View GitHub Profile
@SarahBourgeois
SarahBourgeois / Extends_VDI_VirtualMachine.sh
Last active May 3, 2017 12:12
Increase the .vdi hard disk of your Virtual Machine (With Virtual Box and windows
# 1- open terminal and go to the path of your .vdi you want to modify and do
VboxManage modifymedium <name of your .vdi --resize 80000
# 80000 equals 80
# 2- launch your Virtual Machine.
# 3 -launch DiskPart on your Windows computer. In DiskPart terminal do :
# list volume
list volume
@SarahBourgeois
SarahBourgeois / SqlLite_Android_Example.java
Last active May 17, 2017 20:25
Create a database and table with Sql Lite for your android project
package model;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
/**
* Create by sarahb
* Create SQL table :
@SarahBourgeois
SarahBourgeois / Timer_Call_Method.cs
Last active November 15, 2022 08:10
C# Execute specified function every X minutes or X time you want in a thread
using System;
using System.Timers;
namespace CallFunction
{
public class Program
{
public Program()
{
@SarahBourgeois
SarahBourgeois / autocompletion.js
Created May 31, 2017 09:05
Simple autocompletion without lib - Javascript
// you're not force to use an array.
var country = ["Finlande", "Fidji", "France", "Espagne", "Equateur", "Etipie", "Estuanie", "Albania","Algeria","Andorra","Angola","Antigua","Armenia", "France", "Bali"]
// search match
function searchCountry(input) {
var reg = new RegExp(input.split('').join('\\w*').replace(/\W/, ""), 'i');
return country.filter(function(nameOfCountry) {
if (nameOfCountry.match(reg)) {
return nameOfCountry;
}
@SarahBourgeois
SarahBourgeois / protect-folder.bat
Created September 25, 2017 09:30
Add a password for a windows folder
cls
@ECHO OFF
title Folder Private
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Etes vous sur de vouloir bloquer les fichiers Y=Oui N=Non(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
@SarahBourgeois
SarahBourgeois / deploy-website-iis.ps1
Created October 6, 2017 12:00
Powershell script to deploy automatically a website on IIS (Internet Information Services) thanks to Msbuild and MsDeploy
# ====================================================
# NAME : deploy-website-iis.ps1
# AUTHOR : Bourgeois Sarah
# Date : à5/10/2017
# VERSION 1.0.0
# COMMENTS : Automatically deploy dotnet website on IIS
# ======================================================
$WEBSITE_PATH = '<your visual studio solution web site path here'
$BUILD_WEBSITE = '<path msbuild>/msbuild.exe <path .csproj file of your website>/yourfile.csproj /T:Package /P:Configuration=Release'
*.swp
*.*~
project.lock.json
.DS_Store
*.pyc
nupkg/
# Visual Studio Code
.vscode
@SarahBourgeois
SarahBourgeois / .gitignore
Created December 18, 2018 21:47
gitignore python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python