$ pip install click requests
$ python query_export.py --redash-url "https://app.redash.io/" --api-key ""
import org.apache.http.client.config.RequestConfig; | |
import org.apache.http.impl.client.CloseableHttpClient; | |
import org.apache.http.impl.client.HttpClientBuilder; | |
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
@Configuration | |
public class ClientHttpPoolConfiguration { |
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n |
Port: 1080 | |
1. Create a file /YOUR PATH/gitproxy.sh with content: | |
#!/bin/sh | |
nc -X 5 -x 127.0.0.1:1080 "$@" | |
2. Edit your ~/.gitconfig | |
# For git:// |
These methods in this gist worked for me on my U.S. based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).
Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
named Scancode Map
.
You will enter the raw bytes like this (thanks @quapka):
import br.com.radharsomeluz.inventory.configuration.SoftDeletionMongoRepository; | |
import br.com.radharsomeluz.inventory.configuration.SoftDeletionRepositoryFactoryBean; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; | |
import springfox.documentation.swagger2.annotations.EnableSwagger2; | |
@SpringBootApplication | |
@EnableSwagger2 | |
@EnableMongoRepositories( |
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
import java.net.URL; | |
import java.security.SecureRandom; | |
import java.security.cert.CertificateException; | |
import java.security.cert.X509Certificate; | |
import javax.net.ssl.HostnameVerifier; | |
import javax.net.ssl.HttpsURLConnection; | |
import javax.net.ssl.KeyManager; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.SSLSession; | |
import javax.net.ssl.TrustManager; |
# list available subtitles | |
# https://superuser.com/questions/927523/how-to-download-only-subtitles-of-videos-using-youtube-dl | |
youtube-dl --list-subs https://www.youtube.com/watch?v=lmWh9jV_1ac | |
# download a particular subtitle | |
youtube-dl --write-sub --sub-lang zh-CN --skip-download https://www.youtube.com/watch\?v\=lmWh9jV_1ac | |
# download auto generated sub | |
youtube-dl --write-auto-sub --sub-lang zh-CN --skip-download https://www.youtube.com/watch\?v\=lmWh9jV_1ac |
// Website you intended to retrieve for users. | |
const upstream = 'api.openai.com' | |
// Custom pathname for the upstream website. | |
const upstream_path = '/' | |
// Website you intended to retrieve for users using mobile devices. | |
const upstream_mobile = upstream | |
// Countries and regions where you wish to suspend your service. |