Skip to content

Instantly share code, notes, and snippets.

@gsongX
gsongX / CVE-2021-25646.md
Created February 4, 2021 14:43 — forked from pikpikcu/CVE-2021-25646.md
CVE-2021-25646
POST /druid/indexer/v1/sampler?for=example-manifest HTTP/1.1
Host: REDACTED
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: application/json, text/plain, */*
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Content-Type: application/json
Content-Length: 1006
Connection: close
@gsongX
gsongX / Makefile
Created August 8, 2020 14:22 — forked from YashasSamaga/Makefile
OpenCV DNN Benchmark Code
g++ -I/usr/local/include/opencv4/ benchmark.cpp -lopencv_core -lopencv_imgproc -lopencv_dnn -lopencv_imgcodecs -O3 -std=c++17
@gsongX
gsongX / disable.sh
Created July 28, 2020 13:52
Disable bunch of #$!@ in Catalina
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@gsongX
gsongX / get_current_location.html
Created February 12, 2019 16:51 — forked from YmkSun/get_current_location.html
Get Current Location
<!DOCTYPE html>
<html>
<head>
<title>Simple Map</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAUOUXwDASZgoB1UpUuAurPmkkgqIY-noc" async defer></script>
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<style>
#!/usr/bin/env bash
export SVN_SERVER_BASE_URL=file:///c/src/test-migration/
export SVN_REPO=svn-repo
export SVN_URL=$SVN_SERVER_BASE_URL$SVN_REPO
export SVN_TRUNK=$SVN_URL/trunk
export SVN_BRANCH=$SVN_URL/branches
export SVN_TAG=$SVN_URL/tags
export LOCAL_GIT_REPO_FOLDER=repo
export AUTHORS_FILE=all-authors.txt
@gsongX
gsongX / install_ffmpeg-nvenc_obs.sh
Created May 31, 2018 00:40 — forked from jniltinho/install_ffmpeg-nvenc_obs.sh
Install FFMPEG GIT + NVENC SDK 8 + OBS GIT
#!/bin/bash
## Install FFMPEG GIT Ubuntu 16.04 64Bits
## http://www.linuxpro.com.br/2017/04/compile-ffmpeg-nvenc-ubuntu/
## Pacote Compilado no GITHUB: https://github.com/jniltinho/oficinadotux
## Run as root (sudo su)
## Links
## http://ftp.eq.uc.pt/software/Linux/deb-multimedia/pool/main/v/vid.stab/
## https://gist.github.com/Brainiarc7/4b49f463a08377530df6cecb8171306a
## https://developer.nvidia.com/ffmpeg
@gsongX
gsongX / install_ffmpeg_nvenc.sh
Created May 31, 2018 00:39 — forked from jniltinho/install_ffmpeg_nvenc.sh
Install FFMPEG 2.8.6 support NVENC on Ubuntu 16.04
#!/bin/bash
## Install FFMPEG 2.8.6 Ubuntu 16.04 64Bits
## http://www.linuxpro.com.br/2017/04/compile-ffmpeg-nvenc-ubuntu/
## Pacote Compilado no GITHUB: https://github.com/jniltinho/oficinadotux
## Run as root (sudo su)
## Check Nvidia ENC
## nvidia-smi dmon -i 0
## Test FFMPEG ENCODER NVENC (FFMPEG 2.8.6 NVIDIA-SDK 6.0.1)
@gsongX
gsongX / remove_sl_icon.sh
Created May 15, 2018 18:43 — forked from ulasozguler/remove_sl_icon.sh
Remove spotlight icon from menu bar.
cd /System/Library/CoreServices/Spotlight.app/Contents/MacOS
sudo cp Spotlight Spotlight.bak
sudo perl -pi -e 's|(\x00\x00\x00\x00\x00\x00\x47\x40\x00\x00\x00\x00\x00\x00)\x42\x40(\x00\x00\x80\x3f\x00\x00\x70\x42)|$1\x00\x00$2|sg' Spotlight
cmp -l Spotlight Spotlight.bak
sudo codesign -f -s - Spotlight
sudo killall Spotlight
@gsongX
gsongX / starUML.md
Created April 1, 2018 13:47 — 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:

/**
@gsongX
gsongX / osx-setup.sh
Created October 1, 2017 19:22 — forked from somebox/osx-setup.sh
Set up an OSX machine from zero to awesome. Uses Homebrew (and cask, fonts, etc). Focused on Ruby/Rails development, includes rvm, xquartz, editor fonts, sublime text, and many tools.
#!/bin/bash
# A script to set up a new mac. Uses bash, homebrew, etc.
# Focused for ruby/rails development. Includes many utilities and apps:
# - homebrew, rvm, node
# - quicklook plugins, terminal fonts
# - browsers: chrome, firefox
# - dev: iterm2, sublime text, postgres, chrome devtools, etc.
# - team: slack, dropbox, google drive, skype, etc