- String
- Number
- Boolean
- Object
- Array
/* Apply the effect */ | |
img.grayscale { | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */ | |
filter: gray; /* IE6-9 */ | |
-webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */ | |
} | |
/* Disable the effect */ |
(function($){ | |
'use strict'; | |
$.fn.applySelect2 = function() { | |
this.filter('.select2-no-search').each(function(){ | |
var options = $(this).data('options') || {}; | |
$.extend( options, { minimumResultsForSearch: -1 } ); | |
$(this).data('options', options); |
# Functions to disable/enable scroll | |
scrollPreventDefault = (e) -> | |
e = e or window.event | |
if e.preventDefault | |
e.preventDefault() | |
e.returnValue = false | |
keydown = (e) -> | |
t = [37,38,39,40] |
output.split('').slice(0, -3).join('') + '.000' | |
Ex: | |
'1000000'.split('').slice(0, -3).join('') + '.000' // 1000.000 | |
'100000'.split('').slice(0, -3).join('') + '.000' // 100.000 | |
'10000'.split('').slice(0, -3).join('') + '.000' // 10.000 |
import AWSLambda from 'aws-sdk/clients/lambda' | |
import { mode, modeIsDev } from '@/environment' | |
import type AWSSES from 'aws-sdk/clients/ses' | |
const lambda = new AWSLambda({ | |
endpoint: modeIsDev ? 'http://localhost:3002' : undefined | |
}) | |
const response = await lambda.invoke({ | |
FunctionName: `myApi-${mode}-email`, |
# http://editorconfig.org | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
import crypto from 'crypto' | |
const x509Certificate = '[insert certificate here]' | |
const certificateStrings = x509Certificate.match(/-----BEGIN CERTIFICATE-----\s*([\s\S]+?)\s*-----END CERTIFICATE-----/i) | |
if (certificateStrings && certificateStrings[1]) { | |
throw new Error('Invalid certificate') | |
} | |
const sha1Thumbprint = crypto |
export PATH=~/.npm-global/bin:$PATH | |
export PATH="/Applications/Sublime Text.app/Contents/SharedSupport/bin:$PATH" | |
export PATH="/Applications/Visual Studio Code.app/Contents/Resources/app/bin:$PATH" | |
alias ll='ls -lh' | |
alias dockerps="docker ps -a --format \"table {{.ID}}\t{{.Image}}\t{{.RunningFor}}\t{{.Status}}\t{{.Ports}}\t{{.Names}}\"" | |
eval "$(/opt/homebrew/bin/brew shellenv)" |