Skip to content

Instantly share code, notes, and snippets.

View bearrundr's full-sized avatar

Daeyong Jung bearrundr

  • cloudin
  • Seoul
  • 02:55 (UTC +09:00)
View GitHub Profile
@bearrundr
bearrundr / README.txt
Created February 13, 2022 00:39 — forked from mattweber/README.txt
ElasticSearch Multi-Select Faceting Example
This is an example how to perform multi-select faceting in ElasticSearch.
Selecting multiple values from the same facet will result in an OR filter between each of the values:
(facet1.value1 OR facet1.value2)
Faceting on more than one facet will result in an AND filter between each facet:
(facet1.value1 OR facet1.value2) AND (facet2.value1)
I have chosen to update the counts for each facet the selected value DOES NOT belong to since we are performing an AND between each facet. I have included an example that shows how to keep the counts if you don't want to do this (filter0.sh).

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@bearrundr
bearrundr / main.py
Created December 22, 2021 05:20
python main with command line argument
import argparse
def _build_parser():
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('--test', default="default value", type=str, help="test argument")
return parser
if __name__="__main__":
parser = _build_parser()
@bearrundr
bearrundr / download-vs-code-server.sh
Created December 22, 2021 02:56 — forked from b01/download-vs-code-server.sh
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
#!/bin/sh
set -e
# You can get the latest commit SHA by looking at the latest tagged commit here: https://github.com/microsoft/vscode/releases
commit_sha="08a217c4d27a02a5bcde898fd7981bda5b49391b"
archive="vscode-server-linux-x64.tar.gz"
owner='microsoft'
repo='vscode'
# Auto-Get the latest commit sha via command line.
@bearrundr
bearrundr / aws-cfn.sh
Last active June 6, 2019 12:02 — forked from cgswong/aws-cfn.sh
Setup CentOS server with AWS CFN bootstrap
#!/bin/bash
# Setup CentOS 7 host as AMI
# Update base OS update, and install EPEL repo and Python Pip
sudo yum -y update
sudo yum -y --enablerepo=extras install epel-release
sudo yum -y install python-pip
sudo pip install --upgrade pip
# Install Python add-ons:
@bearrundr
bearrundr / starulm.md
Created March 27, 2019 17:45 — forked from DrYazid/starulm.md
StarUml 3.0 full version

StarUML 3.0

  • 1- install staruml. : staruml
  • 2- install node.js : node.js
  • 3- go to ...\AppData\Local\Programs\StarUML\resources
  • 4- open CMD As admin
  • 5- execute
@bearrundr
bearrundr / starUML.md
Created March 27, 2019 15:10 — forked from trandaison/starUML.md
Get full version of StarUML

StarUML

Download: StarUML.io

Crack

Source: jorgeancal

After installing StartUML successfully, modify LicenseManagerDomain.js as follow:

/**
@bearrundr
bearrundr / gist:c7f68eae11affe934ee138d352755663
Created March 12, 2017 02:16
Excel VBA function to Google Geocode
Function GoogleGeocode(address As String) As String
Dim strAddress As String
Dim strQuery As String
Dim strLatitude As String
Dim strLongitude As String
strAddress = URLEncode(address)
'Assemble the query string
strQuery = "http://maps.googleapis.com/maps/api/geocode/xml?"
@bearrundr
bearrundr / DirectoryWatchService.java
Created October 15, 2016 04:18
Java 1.7+: Watching a Directory for File Changes (Requires Java 1.8+ to run because this code uses some features from Java 8 as well)
package <package>;
import <package>.Service;
import java.io.IOException;
/**
* Interface definition of a simple directory watch service.
*
* Implementations of this interface allow interested parties to <em>listen</em>
function mouseEvent(type, sx, sy, cx, cy) {
var evt;
var e = {
bubbles: true,
cancelable: (type != "mousemove"),
view: window,
detail: 0,
screenX: sx,
screenY: sy,
clientX: cx,