Skip to content

Instantly share code, notes, and snippets.

@i11v
i11v / jquery.fn.serializeObject.js
Last active December 10, 2015 01:38
This function extends jQuery by serializeObject method. Argument — form data, returns object.
;(function ($) {
$.fn.serializeObject = function () {
var obj = {},
arr = this.serializeArray();
$.each(arr, function () {
if (typeof obj[this.name] !== "undefined") {
if (!obj[this.name].push) {
obj[this.name] = [obj[this.name]];
}
@jackblack369
jackblack369 / mysql.md
Last active July 13, 2023 01:14
[mysql] #mysql
  • the size of blob column
     A BLOB can be 65535 bytes (64 KB) maximum.
     If you need more consider using:
     a MEDIUMBLOB for 16777215 bytes (16 MB)
     a LONGBLOB for 4294967295 bytes (4 GB).
    
  • join sql
  • string convert to timstamp
@ihor-lev
ihor-lev / sublime_fix_home_end_keys.md
Last active November 1, 2024 21:53
Fix Sublime Text Home and End key usage on Mac OSX

Sublime Text Home/End keys default functionality jumps to the beginning and end of the file.

Fix Home and End keys to move the cursor to the beginning and end of lines.

Preferences > Key Bindings - User

Adding the following to the array:

{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },