Skip to content

Instantly share code, notes, and snippets.

@lucabelluccini
lucabelluccini / rpi4.boot-from-sd-rootfs-on-usb.md
Last active October 13, 2023 12:38
Raspberry Pi 4 - Boot from SD, Rootfs on USB

Raspberry 4B - Boot from SD and rootfs on USB

Update

RPi4 now supports booting directly from USB. First update to get an eeprom which supports USB Boot, then configure the bootloader to boot from USB.

Original guide

  1. Download Raspbian from the official site
@jruts
jruts / neo4j_delete_duplicate_nodes.md
Last active September 28, 2023 14:22
How to delete duplicate nodes and their relationships in neo4j with cypher?

How to delete duplicate nodes and their relationships in neo4j with cypher based on a property of that node?

The problem is easy to understand. We have 'duplicate' nodes in our database based on the 'id' field on the node properties.

Well this sounds easy enough, until you have to actually do it.

First step

My first attempt was to try and figure out which nodes are actualy duplicate (based on a property on the node). This seems to be pretty straightforward.

Cypher:

@DaniSancas
DaniSancas / neo4j_cypher_cheatsheet.md
Created June 14, 2016 23:52
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
@jgoux
jgoux / app.js
Created April 15, 2014 14:53
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});
@brianmhunt
brianmhunt / models.py
Last active December 3, 2015 19:01
tags for ndb on Google App Engine / Python
"""
From blog post: http://brianmhunt.github.io/articles/ndb-tags/
License: MIT <http://brianmhunt.mit-license.org/>
"""
from google.appengine.ext import ndb
MAX_TAGS_FOR_TAGGABLE = 1000
POPULAR_PAGE_SIZE = 30
var attempts = 1;
function createWebSocket () {
var connection = new WebSocket();
connection.onopen = function () {
// reset the tries back to 1 since we have a new connection opened.
attempts = 1;
// ...Your app's logic...
/**
* Fetching data from BigQuery and present it in our sheet
* Author: Ido Green
* Date: 14/12/2013
*
* See: https://greenido.wordpress.com/2013/12/16/big-query-and-google-spreadsheet-intergration/
* Misc: https://developers.google.com/bigquery/
*/
//
@michaeltandy
michaeltandy / setup-mapbox.sh
Last active November 15, 2022 06:45
Set up Tilemill on Ubuntu 12.04 and the OSM bright stylesheet and postgres/postgis and imposm and import OpenStreetMap data for the Isle of Wight (it's fairly small so it'll import quickly)
#!/bin/bash
# Based on http://www.mapbox.com/tilemill/docs/guides/osm-bright-ubuntu-quickstart/
sudo add-apt-repository --yes ppa:developmentseed/mapbox
sudo apt-get update
sudo apt-get --yes install tilemill libmapnik nodejs postgresql postgresql-9.1-postgis build-essential python-dev protobuf-compiler libprotobuf-dev libtokyocabinet-dev python-psycopg2 libgeos-c1 python-pip git
sudo pip install imposm
mkdir osm