Skip to content

Instantly share code, notes, and snippets.

<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<charset>UTF-8</charset>
<pattern>%date{ISO8601} %-5.5p [%15.15t] [%30.30c:%-5line] %X{indent}%m%n</pattern>
</encoder>
# Components
import Component from '@ember/component';
const CApproveTransactionModalButton = Ember.Component.extend({
actions: {
...
},
didInsertElement: function() {
Ember.run.scheduleOnce('afterRender', this, function() {
// Override ID of Component
// my-component.hbs
<div id={{elementId}}>
...
</div>
// index.hbs
{{my-component elementId="my-custom-div-id"}}
@chinboon
chinboon / import-certificate-into-keystore.sh
Created January 18, 2018 10:54
import-certificate-into-keystore.sh
keytool -import -trustcacerts -file sit-csp.cer -alias SIT_CERT -keystore $JAVA_HOME/jre/lib/security/cacerts
@chinboon
chinboon / get-self-signed-certificate.sh
Last active January 18, 2018 10:52
get-self-signed-certificate.sh
# execute this command in a linux box
openssl s_client -connect a.b.com:8543
# look for text that looks like
-----BEGIN CERTIFICATE-----
MIIG3TCCBcWgAedewdewdewdqewfqewfrewfrefreAQUFADCBzDE2MDQG
...
sIIG3TCCBcWgAedewdewdewdqewfqewfrewfrefreAQUFADCBzDE2refr
-----END CERTIFICATE-----
@chinboon
chinboon / find-files-not-belonging-to-user-or-group.sh
Last active December 18, 2017 10:32
find-files-not-belonging-to-user-or-group.sh
# find files not belonging to a particular user
# ! chinboon
find . \! -user chinboon -print
# find files not belonging to a particular user and group
# ! chinboon:staff
find . \! -user chinboon -group staff -print
@chinboon
chinboon / find-files-modified-x-minutes-ago.sh
Created December 18, 2017 10:23
find-files-modified-x-minutes-ago.sh
# MAC
# +30 is older than 30 day, -30 would be modified in last 30 days.
# mtime n modified time (n* 24 hours)
# atime n accessed time (n* 24 hours)
# mmin n modified time (n * 1 min)
# find all files modified since 2 hours ago
find . -type f -mtime -2 -exec ls -l {} \;
@chinboon
chinboon / intellij-customizations
Created December 17, 2017 08:10
intellij-customizations
Settings > Terminal
"C:\Git\bin\sh.exe" --login -i
@chinboon
chinboon / read-contents-without-unzip.sh
Last active December 17, 2017 08:11
read-the-contents-of-a-zipped-file-without-extraction
-- to list the files (relative path)
unzip -l archive.zip
-- to read contents
unzip -c archive.zip file1.txt | less
@chinboon
chinboon / git-change-password-win-mac.sh
Created August 11, 2017 09:44
git-change-password-win-mac.sh
# windows
git config --global credential.helper wincred
# mac
git config --global credential.helper osxkeychain