Install packages:
sudo apt-get install xbindkeys xsel xdotool
Create xbindkey configuration file:
# ~/.xbindkeysrc
<? | |
function smart_img_resize($orig, $dest_width=null, $dest_height=null) | |
{ | |
$orig_width = imagesx($orig); | |
$orig_height = imagesy($orig); | |
$vertical_offset = 0; | |
$horizontal_offset = 0; | |
if($dest_width == null) | |
{ |
git pull --rebase origin master |
Time.now.strftime("%Y%m%d%H%M%S") |
#!/bin/bash | |
pantheon-terminal . source ~/.bashrc |
index = window.location.href.indexOf('localhost') | |
index2 = window.location.href.indexOf('127.0.0.1') | |
if window.location.protocol != 'https:' && !(index > -1 || index2 > -1) | |
window.location.href = 'https:' + window.location.href.substring(window.location.protocol.length) |
A UUID is a globally unique universal identifier. These are extremely useful in a CRM-like environment, because they can express descendant/ancestor relationships without the need to traverse a join chain of intermediate relationships. You can get everything "belonging" to a particular user/record/account/whatever in a single SELECT
statement with no JOINS
.
for every row in the database across ALL tables:
record.uuid
ancestor_uuids
containing the UUIDs of all ancestor records (up to Account)so a Task
record might have UUIDs for a RepeatingTask
, User
, and Account
in its ancestor_uuids
array
Now what can we do with this?
CRM data is hierarchical, but RDBMSes are not. In a hierarchical system, deleting is as easy as deleting a single node. In an RDBMS, especially one with CRM data, this can be extremely difficult because there is a dense hierarchy of polymorphic relationships standing between you and the records you want to delete (or access!).
We need flat models!! This means that if there is a hierarchy of records, for example an Account has many Users, which each have many tasks, which in turn can have custom field values, then every single custom value record should have a task_id, a user_id, and an account_id ON THE RECORD. Even if custom field values are used on non-task tables, then the custom field values should simply have id's associated with those tables as well. For example if Projects can have custom field values,
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>GET</AllowedMethod> | |
<AllowedMethod>HEAD</AllowedMethod> | |
<AllowedMethod>PUT</AllowedMethod> | |
<AllowedMethod>POST</AllowedMethod> | |
<AllowedMethod>DELETE</AllowedMethod> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> |
# Configure touchpads to use xf86-input-synaptics X input driver | |
Section "InputClass" | |
Identifier "touchpad" | |
MatchIsTouchpad "on" | |
MatchDevicePath "/dev/input/event*" | |
Driver "synaptics" | |
Option "MinSpeed" "0.4" | |
Option "MaxSpeed" "1.0" | |
Option "AccelFactor" "0.0035" |