This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"sort" | |
) | |
type Person struct { | |
Name string | |
Age int |
This file contains hidden or 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/bash | |
fdupes -rSdNI ./ |
This file contains hidden or 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 test -x $0 && (go build -o "${0}c" "$0" && "${0}c" $@; r=$?; rm -f "${0}c"; exit "$r"); exit "$?" | |
// | |
// The top "comment" defines shebang | |
// More over: | |
// * https://gist.github.com/posener/73ffd326d88483df6b1cb66e8ed1e0bd | |
// * https://getstream.io/blog/switched-python-go/ | |
package main | |
import ( |
This file contains hidden or 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
# Officia microsoft .NET SDK image | |
FROM mcr.microsoft.com/dotnet/core/sdk:latest AS api-build | |
# Set directory for build | |
WORKDIR /app | |
# Copy anything from where docker would be builded | |
COPY ./. ./ | |
# Reice packages, Build and shrink as an standalone exutable file |
This file contains hidden or 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 | |
git clone https://github.com/mapbox/mbutil | |
cd mbutil | |
./mb-util --image_format=pbf *.mbtiles tiles | |
gzip -d -r -S .pbf * | |
find . -type f -exec mv '{}' '{}'.pbf \; |
This file contains hidden or 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
package main | |
import ( | |
"database/sql" | |
"github.com/mattn/go-sqlite3" | |
"log" | |
"os" | |
) | |
func runQuery(db *sql.DB, query string) { |
This file contains hidden or 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 | |
whois $(dig +short @1.1.1.1 produktor.io | head -1) | grep -Po "org-name\:\s+\K.+" |
This file contains hidden or 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 | |
# Determinate CPU capabilities | |
MAX_CPU=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq) | |
MIN_CPU=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq) | |
# Install MSR tools and Linux tools to get hack BIOS | |
# apt install -y msr-tools linux-tools-common linux-tools-$(uname -r) | |
This file contains hidden or 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
/** | |
* Get this fucking object | |
* | |
* @param {String} url URL я для http не учитывал | |
* @param {Function} onData(data) колбэк когда всё норм, будет вызван с уже готовым объектом | |
* @return {*} | |
*/ | |
function getThisFuckingJsonObject(url, onData) { | |
let chunks = []; | |
return require('https').get(url, res => { |
This file contains hidden or 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 | |
# Requires: | |
# PPA="ppa:bitcoin/bitcoin" | |
# PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev" | |
unset CC | |
unset CXX | |
unset DISPLAY |