Skip to content

Instantly share code, notes, and snippets.

@marcoscastro
marcoscastro / example.py
Created October 22, 2016 03:42
Example foreign key with bottle-sqlalchemy
from sqlalchemy import Column, DateTime, String, Integer, ForeignKey, func
from sqlalchemy.orm import relationship, backref
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
Base = declarative_base()
class Person(Base):
__tablename__ = 'person'
# Here we define columns for the table person
@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active May 21, 2024 19:42
Ubuntu and Debian Cloud images in Proxmox
@realvjy
realvjy / ChoasLinesShader.metal
Last active May 21, 2024 19:41
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@trusktr
trusktr / DefaultKeyBinding.dict
Last active May 21, 2024 19:41
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@aallan
aallan / mac-vendor.txt
Last active May 21, 2024 19:37
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?
@Zekfad
Zekfad / conventional-commits.md
Last active May 21, 2024 19:37
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change / feat(scope)!: rework API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries
@pixeline
pixeline / mirror_remote_directory_to_local_directory
Last active May 21, 2024 19:36
Bash script using lftp to mirror remote directory to local directory, thus keeping the local directory synchronized with the remote one.
#!/bin/sh
# @author: Alexandre Plennevaux
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP
#
# FTP LOGIN
HOST='sftp://ftp.domain.com'
USER='ftpusername'
PASSWORD='ftppassword'
# DISTANT DIRECTORY
// gspa plugin like SplitText3.min.js CustomEase3.min.js
// !!!! ALWAYS SUPPORT THE DEVELOPERS, GSAP IS THE BEST TOOL OUT THERE. !!!!
// THIS IS FOR EDUCATION PURPOSE ONLY!
// Gsap script check for your window.location.href to identify if you're on a allowed site list.
// these list are in a array for charcter code
// [103, 114, 101, 101, 110, 115, 111, 99, 107, 46, 99, 111, 109] === 'greensock.com'
// you can add your domain aswell in this array.
// Plugins are minified use https://beautifier.io/ or any other site to get a readble code.
@colepeters
colepeters / index.html
Last active May 21, 2024 19:32
Example of a custom element to prefetch a link's `href`
<prefetched-link href="https://prefetch-this-href.example.org">
This link's href is prefetched if the user is on a fast network
</prefetched-link>