This file contains 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
using (WebClient client = new WebClient()) | |
{ | |
client.Headers = new WebHeaderCollection{{"x-access-token", "..."}}; | |
await using (Stream stream = client.OpenRead("http://...dump.json")) | |
using (StreamReader streamReader = new StreamReader(stream ?? throw new NullJsonDumpException())) | |
using (JsonTextReader reader = new JsonTextReader(streamReader)) | |
{ | |
reader.SupportMultipleContent = true; | |
var serializer = new JsonSerializer(); |
This file contains 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
# Tip: You can just define all environment variables used here in a | |
# .env file in the same directory so as not to expose secrets | |
# docker-compose will load it automatically | |
services: | |
s3fs: | |
privileged: true | |
image: efrecon/s3fs:1.86 | |
restart: always | |
environment: | |
- AWS_S3_BUCKET=${AWS_S3_BUCKET} |
This file contains 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
docker run --network=host --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i http://localhost:5000/swagger/v1/swagger.json -g {LANGUAGE} -o /local/sdks/{LANGUAGE} |
This file contains 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
//npm.pkg.github.com/:_authToken={TOKEN} | |
@{company}:registry=https://npm.pkg.github.com |
This file contains 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
google-chrome --user-data-dir=”/var/tmp/Chrome” --disable-web-security & |
This file contains 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 | |
usage() { | |
cat << EOF | |
Usage: $0 [OPTION] | |
Build frontend. | |
Arguments: | |
-d Dev-mode (This will skip any production-specific operations) | |
-s Push stable to docker.io, ignored in dev-mode. (auto-set by "feat:*" commit) | |
-b Build image (auto-set after a new commit) |
This file contains 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 python | |
# coding: utf-8 | |
# Requirements | |
# sudo apt install mdbtools | |
import os | |
import subprocess | |
This file contains 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
# START_0f56bb1d | |
# To Install permanently: | |
# curl -s https://gist.githubusercontent.com/HeshamMeneisi/0f56bb1dfd3ca3d09d304d3a02107205/raw/Productivity >> ~/.bashrc && source ~/.bashrc | |
# To Uninstall: | |
# cp ~/.bashrc bashrc.bak && perl -0777 -i -pe "s/# START_0f56bb1d.+# END_0f56bb1d//igs" ~/.bashrc | |
# To use temporarily: | |
# source <(curl -s https://gist.githubusercontent.com/HeshamMeneisi/0f56bb1dfd3ca3d09d304d3a02107205/raw/Productivity) | |
# Useful paths | |
# !! MAKE SURE TO UPDATE VERSION NUMBERS !! | |
export PATH=/home/$USER/.dotnet:/usr/local/cuda-9.0/bin:~/browser-drivers:~/.composer/vendor/bin${PATH:+:${PATH}} |
This file contains 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
# http://blog.jessitron.com/2013/08/finding-and-removing-large-files-in-git.html | |
git rev-list master | while read rev; do git ls-tree -lr $rev | cut -c54- | grep -v '^ '; done | sort -u | perl -e ' | |
while (<>) { | |
chomp; | |
@stuff=split("\t"); | |
$sums{$stuff[1]} += $stuff[0]; | |
} | |
print "$sums{$_} $_\n" for (keys %sums); | |
' | sort -rn >> /tmp/large_files | |
gedit /tmp/large_files |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace CSV |
NewerOlder