Skip to content

Instantly share code, notes, and snippets.

View ncouture's full-sized avatar
🌳
Continuously Growing!

Nicolas Couture ncouture

🌳
Continuously Growing!
View GitHub Profile
@ncouture
ncouture / FirebaseToFirestore.js
Created May 6, 2018 15:35 — forked from JoeRoddy/FirebaseToFirestore.js
Convert Firebase Database JSON to Firestore Collections
var db = firebase.firestore();
var content = require("./sourceData.json");
content &&
Object.keys(content).forEach(contentKey => {
const nestedContent = content[contentKey];
if (typeof nestedContent === "object") {
Object.keys(nestedContent).forEach(docTitle => {
firebase
.firestore()
@ncouture
ncouture / compound-query.js
Created May 6, 2018 15:35 — forked from ademilter/compound-query.js
Firestore #firebase
var citiesRef = db.collection("cities");
var query = citiesRef.where("capital", "==", true);
citiesRef.where("state", "==", "CA")
citiesRef.where("population", "<", 100000)
citiesRef.where("name", ">=", "San Francisco")
citiesRef
.where("state", "==", "CA")
import subprocess
import argparse
import base64
import json
"""
Currently uses Google's cloud speech API
"""
from googleapiclient import discovery
@ncouture
ncouture / face_identification.ipynb
Created April 19, 2018 18:57 — forked from onidzelskyi/face_identification.ipynb
Simple Python app show you easy way to identify particular face among the other faces
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
#
# Google Cloud Platform functions.
#
# - All functions act on the default project configured for `gcloud'.
#
# Install the gcloud command line interface.
install_gcloud_cli() {
@ncouture
ncouture / reverse-tether.sh
Created March 15, 2017 17:12 — forked from chrisob/reverse-tether.sh
Android reverse tethering over bridged SSH tap interface
#!/bin/bash
# Based on the scripts written by class101 of xda-developers.com:
# http://forum.xda-developers.com/showpost.php?p=57490025&postcount=205
#
# This script enables a secure tunnel for your android phone to "reverse tether"
# and access the internet/a private network via the following steps:
#
# 1. Establish a level 3 (TAP) tunnel from your local host to a remote server via SSH (tap0)
# 2. Establish a level 3 interface between your local host and your android phone via USB (usb0)
@ncouture
ncouture / pyquery-spider.py
Created November 6, 2016 13:34
This is a re-implementation using PyQuery instead of XPaths for the Scrapy spider tutorial found here: http://doc.scrapy.org/en/latest/intro/tutorial.html#our-first-spider
from scrapy.spider import BaseSpider
# Requires this patch:
# https://github.com/joehillen/scrapy/commit/6301adcfe9933b91b3918a93387e669165a215c9
from scrapy.selector import PyQuerySelector
class DmozSpiderPyQuery(BaseSpider):
name = "pyquery"
allowed_domains = ["dmoz.org"]
start_urls = [
#### Contents of the preconfiguration file (for jessie)
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
#d-i debian-installer/language string en
#d-i debian-installer/country string NL
#d-i debian-installer/locale string en_GB.UTF-8
# Optionally specify additional locales to be generated.