This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global mergetool.smerge.cmd 'smerge mergetool "$BASE" "$LOCAL" "$REMOTE" -o "$MERGED"' | |
git config --global mergetool.smerge.trustExitCode true | |
git config --global merge.tool smerge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/Library | |
mkdir KeyBindings | |
touch KeyBindings/DefaultKeyBinding.dict | |
defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Required tools: | |
# - curl | |
# - 7z (for extracting dmg) | |
# - docker | |
curl -LO https://devimages-cdn.apple.com/design/resources/download/SF-Mono.dmg | |
7z e SF-Mono.dmg 'SFMonoFonts/SF Mono Fonts.pkg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
readonly INFRASTRUCTURE=liferay.cloud | |
readonly API_URL=https://api.${INFRASTRUCTURE} | |
readonly PROJECTS_URL=${API_URL}/projects | |
while getopts p:e: flag | |
do | |
case "${flag}" in | |
p) PROJECT_ID=${OPTARG};; | |
e) ENVIRONMENT=${OPTARG};; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
shopt -s dotglob | |
curl -LO https://github.com/apangin/jattach/releases/download/v1.5/jattach | |
echo 'adab16e1081aa4fafc91f3f2e44262338a498d8f853d3c6801050889e6389548 jattach' | sha256sum --check --status | |
chmod +x jattach | |
./jattach $(pidof java) dumpheap /opt/liferay/data/LiferaySupport/$(hostname)/$(date +%Y_%m_%d-%H_%M).hprof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# you might want to add some user authentication here | |
mysql -e "show variables; show status" | awk ' | |
{ | |
VAR[$1]=$2 | |
} | |
END { | |
MAX_CONN = VAR["max_connections"] | |
MAX_USED_CONN = VAR["Max_used_connections"] | |
BASE_MEM=VAR["key_buffer_size"] + VAR["query_cache_size"] + VAR["innodb_buffer_pool_size"] + VAR["innodb_additional_mem_pool_size"] + VAR["innodb_log_buffer_size"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function(d){ | |
var init = function(){ | |
var form = d.getElementById("my_form"), input = d.getElementById("url"), iframe = d.getElementById("browser"); | |
form.addEventListener("submit", function(e){ | |
var val = input.value; | |
if(val) { | |
iframe.src = "//" + val; | |
console.log(val); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Keyword: dxp | |
// Result Rankings: | |
// - 2 Web Content articles pinned & reorderd | |
// - 1 Web Content article hidden | |
{ | |
"from":0, | |
"size":20, | |
"query":{ | |
"bool":{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jenkins.model.Jenkins | |
import com.cloudbees.plugins.credentials.Credentials | |
import com.cloudbees.plugins.credentials.CredentialsProvider | |
import com.cloudbees.hudson.plugins.folder.Folder | |
Set<Credentials> credentials = | |
CredentialsProvider.lookupCredentials(Credentials.class) |
NewerOlder