Skip to content

Instantly share code, notes, and snippets.

View WooodHead's full-sized avatar

WooodHead

  • Hangzhou
View GitHub Profile
"query": {
"bool": {
"should": [
{
"multi_match": {
"query": "malaga cromo",
"fields": [
"titulo"
],
"operator": "and"
@WooodHead
WooodHead / README.md
Created January 29, 2022 07:00 — forked from MichaelCurrin/README.md
GitHub GraphQL - Get files in a repository

Get GitHub Files

Get the metadata and content of all files in a given GitHub repo using the GraphQL API

You might want to get a tree summary of files in a repo without downloading the repo, or maybe you want to lookup the contents of a file again without download the whole repo.

The approach here is to query data from GitHub using the Github V4 GraphQL API.

About the query

@WooodHead
WooodHead / get-all-files.gql
Created January 29, 2022 06:57 — forked from johndevs/get-all-files.gql
Github GraphQL - Get all file contents in repository
# Provide $query as a variable.
# The query is the same as you would enter into the search field e.g. "org:johndevs in:name feedreader"
query GetFilesQuery($branch: GitObjectID, $query: String!) {
search(first: 1, type: REPOSITORY, query: $query) {
edges {
node {
... on Repository {
object(expression: "master:", oid: $branch) {
... on Tree {
@WooodHead
WooodHead / bool_query.md
Created November 2, 2021 16:13 — forked from TomonoriSoejima/bool_query.md
role test.md
POST /_security/role/access_role_1
{
    "indices" : [
      {
        "names" : [
          "test"
        ],
        "privileges" : [
 "read"
@WooodHead
WooodHead / docker-compose.yml
Created September 17, 2021 16:37 — forked from donhenton/docker-compose.yml
Redis/Redis-commander Docker Compose with Persistence
version: '3'
services:
redis:
container_name: redis
hostname: redis
image: redis
command: ["redis-server", "--appendonly", "yes"]
volumes:
- ~/redis/data:/data
ports:
@WooodHead
WooodHead / monstache
Created September 14, 2021 08:51 — forked from adowning/monstache
apt update
apt install build-essentials git
sudo apt-get install -y zsh
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sudo apt install -y default-jdk default-jre
sudo echo 'export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64' > /etc/environment
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
@WooodHead
WooodHead / elastic_dup_remove.py
Created September 14, 2021 01:36 — forked from thuhak/elastic_dup_remove.py
remove duplicated records in elasticsearch
#!/usr/bin/env python3.6
# A description and analysis of this code can be found at
# https://alexmarquardt.com/2018/07/23/deduplicating-documents-in-elasticsearch/
from argparse import ArgumentParser
import hashlib
from elasticsearch import Elasticsearch
@WooodHead
WooodHead / WebGL-WebGPU-frameworks-libraries.md
Created August 4, 2021 02:46 — forked from dmnsgn/WebGL-WebGPU-frameworks-libraries.md
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries

  • three.js: JavaScript 3D library
  • stack.gl: an open software ecosystem for WebGL, built on top of browserify and npm.
  • PixiJS: Super fast HTML 5 2D rendering engine that uses webGL with canvas fallback
  • Pex: Pex is a javascript 3d library / engine allowing for seamless development between Plask and WebGL in the browser.
  • Babylon.js: a complete JavaScript framework for building 3D games with HTML 5 and WebGL
  • Filament: Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS and WASM/WebGL
  • ClayGL: A WebGL graphic library
@WooodHead
WooodHead / diagrams.md
Created June 9, 2021 08:38 — forked from blackcater/diagrams.md
Markdown Diagrams

Diagrams

Markdown Preview Enhanced supports rendering flow charts, sequence diagrams, mermaid, PlantUML, WaveDrom, GraphViz, Vega & Vega-lite, Ditaa diagrams. You can also render TikZ, Python Matplotlib, Plotly and all sorts of other graphs and diagrams by using Code Chunk.

Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.

Flow Charts

This feature is powered by flowchart.js.

@WooodHead
WooodHead / yt2text.py
Created May 29, 2021 08:09 — forked from saerdnaer/yt2text.py
download german transcript from youtube and convert to better readable text
'''
Downloads YouTube subtitles to human readable text, while fixing casing of german words.
Example usage:
python3 yt2text.py _RlwgfYd65Q > ultraschall5.txt
'''
import argparse
from youtube_transcript_api import YouTubeTranscriptApi