Skip to content

Instantly share code, notes, and snippets.

View EdmondFrank's full-sized avatar
👀
Exploring

edmondfrank EdmondFrank

👀
Exploring
  • China
View GitHub Profile
@EdmondFrank
EdmondFrank / accesslog.conf
Last active September 2, 2021 05:06
Ruby access log filter plugin
# Sample Logstash configuration for creating a simple
# Beats -> Logstash -> Elasticsearch pipeline.
input {
file {
path => "/root/linct/access_logs-sample.csv"
sincedb_path => "/dev/null"
start_position => "beginning"
}
}
@EdmondFrank
EdmondFrank / chn_fonts.reg
Created October 11, 2020 01:31 — forked from swordfeng/chn_fonts.reg
Chinese font settings in wine
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
"Arial CE,238"="wqy-microhei.ttc"
"Arial CYR,204"="wqy-microhei.ttc"
"Arial Greek,161"="wqy-microhei.ttc"
"Arial TUR,162"="wqy-microhei.ttc"
"Courier New"="wqy-microhei.ttc"
@EdmondFrank
EdmondFrank / NexusCondaSync.groovy
Created September 7, 2020 05:37
Anaconda sync script for Nexus Repository
import groovy.json.JsonSlurper
import groovy.json.JsonParserType
import org.sonatype.nexus.repository.storage.Asset
import org.sonatype.nexus.repository.storage.Query
import org.sonatype.nexus.repository.storage.StorageFacet
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
CONDA_CLOUD_BASE_URL = "https://conda.anaconda.org"
NEXUS_REPOSITORY = "http://127.0.0.1:8081/repository/conda"
@EdmondFrank
EdmondFrank / simple_dp.rb
Created November 30, 2019 08:12
Simple dynamic programming for pick nums && two num sums
require 'benchmark'
arr = (1..35).to_a.sort_by{ rand }
def rec_opt(arr, i)
if i == 0
arr[0]
elsif i == 1
[arr[0], arr[1]].max
else
val_a = rec_opt(arr, i-2) + arr[i]