Skip to content

Instantly share code, notes, and snippets.

View oddmouse's full-sized avatar

Lindy Roquemore oddmouse

View GitHub Profile
@aprilmintacpineda
aprilmintacpineda / copy-database.js
Last active June 21, 2023 13:52
This nodejs script allows you to copy a faunadb (its collections, indexes, functions, and data) from a source to a destination. Note that the time it will take for this script to complete is completely dependent on how much data you have on your source database.
/**
* NOTES:
* - For the `domain` in configs, please refer to https://docs.fauna.com/fauna/current/api/fql/region_groups
* - For the `secret`, please make sure that it's `admin`. Refer to https://docs.fauna.com/fauna/current/security/keys?lang=javascript
* - The script retains the `Ref` of the data when it's being copied from the source to the destination, so relationships relying on this should still work out of the box.
* - The goal here is to make an exact replicate of the source, so once the script is done running, the destination should just work out of the box.
* - The script also checks if the collection, index, function or data already exists to prevent duplicates.
*/
/**
@jloutsenhizer
jloutsenhizer / ChromecastAppList.json
Created February 7, 2014 00:22
List of Chromecast Receiver Apps as of 2/6/2014 7:00PM GMT-5:00
[
{
"use_channel":true,
"allow_empty_post_data":true,
"app_id":"edaded98-5119-4c8a-afc1-de722da03562",
"url":"http://chromecast.redbull.tv/receiver.php",
"dial_enabled":true
},
{
"use_channel":true,
@enxt
enxt / TuneRPI.sh
Last active August 12, 2017 21:01
Bash script to slimming raspbian image and prepare with nginx and php
#!/bin/sh
sudo apt-get update
sudo apt-get -y upgrade
sudo dpkg-reconfigure tzdata
sudo apt-get -y install console-data locales
sudo dpkg-reconfigure console-data
sudo dpkg-reconfigure locales
@carlwoodward
carlwoodward / ember_websocket_adapter.js
Created January 27, 2014 23:49
A simple websocket adapter for ember-js.
Web.Store = DS.Store.extend();
DS.WebsocketAdapter = DS.RESTAdapter.extend({
callbacks: {},
socket: null,
beforeOpenQueue: [],
ajax: function(url, type, params) {
var adapter = this;
var uuid = adapter.generateUuid();
@plentz
plentz / nginx.conf
Last active March 20, 2026 08:40
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048