Skip to content

Instantly share code, notes, and snippets.

@lucasscariot
lucasscariot / model-user.js
Last active June 22, 2023 17:08
Composite Primary Key in Sequelize
/*
* Migration
*/
'use strict';
module.exports = {
up: function(queryInterface, Sequelize) {
return queryInterface.createTable('Users', {
firstName: {
type: Sequelize.STRING
},
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@fasterthanlime
fasterthanlime / state-of-emergency-in-france.md
Last active March 26, 2021 21:29
What the state of emergency means in France, where it's been declared following the Paris attacks
@tunght13488
tunght13488 / quadratic-bezier.js
Last active December 15, 2023 10:13
quadratic bezier curve length in javascript
/*
* http://en.wikipedia.org/wiki/B%C3%A9zier_curve
* http://www.malczak.linuxpl.com/blog/quadratic-bezier-curve-length/g
*/
function Point(x, y) {
this.x = x;
this.y = y;
}
@mrprompt
mrprompt / ExportSQLite.grt.lua
Created October 31, 2013 15:49
MySQL WorkBench Plugin to export database to SQLite
-- ExportSQLite: SQLite export plugin for MySQL Workbench
-- Copyright (C) 2009 Thomas Henlich
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
@canadaduane
canadaduane / bbwifi.txt
Created May 19, 2013 18:41
BeagleBone WiFi can be manually enabled with "test-connman connect" but autoconnect fails
# Adventures In Wireless BeagleBone Black:
# What prevents my Edimax WiFi USB dongle from autoconnecting to my home WiFi network, "Catalina Island Network"?
# NOTE: If you're here to glean info for your own setup, note that I've installed the
# following two connman auxiliary packages which give the tools and test scripts in
# /usr/lib/connman/test that I use below
# $ opkg install connman-tools connman-tests
#
# Also, I've disabled power save mode for the WiFi so that the BBB can act as a server:
# $ cat > /etc/udev/rules.d/wifi_power_save.rules <<-EOF