Skip to content

Instantly share code, notes, and snippets.

View weaming's full-sized avatar
🦀
Rustacean

Garden Yuen weaming

🦀
Rustacean
  • Shenzhen, China
View GitHub Profile
@protrolium
protrolium / ffmpeg.md
Last active April 8, 2024 11:49
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@brettlangdon
brettlangdon / Wallpapers.md
Last active December 22, 2023 16:38
Wallpapers

Wallpapers

Install with git git clone https://gist.github.com/85942af486eb79118467.git ~/Pictures/wallpapers

Tmux is a "terminal multiplexer", it enables a number of terminals to be accessed and controlled from a single terminal.
If you use Debian/Ubuntu, you can just run apt-get install tmux, and voila.
Since the title was about centos 7, then do the following step to install tmux.
(1). tmux has a library dependency on libevent which, of course, isn’t installed by default.
$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
$ tar xzvf libevent-2.0.21-stable.tar.gz
$ cd libevent-2.0.21-stable
$ ./configure && make
@githubutilities
githubutilities / ntfs-mac.md
Last active December 13, 2023 02:04
NTFS in Mac
@eduncan911
eduncan911 / go-build-all
Last active April 11, 2024 07:14
Go Cross-Compile Script
#!/bin/bash
#
# GoLang cross-compile snippet for Go 1.6+ based loosely on Dave Chaney's cross-compile script:
# http://dave.cheney.net/2012/09/08/an-introduction-to-cross-compilation-with-go
#
# To use:
#
# $ cd ~/path-to/my-awesome-project
# $ go-build-all
#
@StudioEtrange
StudioEtrange / MacOS X El Capitan with Vagrant - MacOS X VM on Windows or Linux.md
Last active July 28, 2023 14:49
MacOS X El Capitan with Vagrant - MacOS X VM on Windows/Linux
/**
* 百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换的工具
*
* 参考 https://github.com/wandergis/coordtransform 实现的Java版本
* @author geosmart
*/
public class CoordinateTransformUtil {
static double x_pi = 3.14159265358979324 * 3000.0 / 180.0;
// π
static double pi = 3.1415926535897932384626;
@r0l1
r0l1 / confirm.go
Last active November 25, 2023 19:12
Go (golang): How to ask for user confirmation via command line
/* MIT License
*
* Copyright (c) 2017 Roland Singer [roland.singer@desertbit.com]
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@nikAizuddin
nikAizuddin / oreilly-freebooks.sh
Last active October 20, 2020 03:34
This UNIX Shell script will download most O'Reilly free pdf books about Programming, Security, Business, Data, Design, IoT, WebDev, and WebOps from http://www.oreilly.com/programming/free/.
#!/bin/sh
################################################################################
## This UNIX Shell script will download most O'Reilly free pdf books
## about Programming, Security, Business, Data, Design, IoT, WebDev, and WebOps
## from http://www.oreilly.com/programming/free/.
## There are a few books that are non-free, so I don't list them here.
##
## --- How to RUN? ---
## $ sh -e oreilly-freebooks.sh
/*Solution for Friends Algorithm written in JavaScript
Painful lessons learned
Javascript keys are always strings
*/
var relationships
var raw_data
//Turn strings into sparse array for search