Skip to content

Instantly share code, notes, and snippets.

View aedm's full-sized avatar
🍒

Gábor Gyebnár aedm

🍒
  • Budapest, Hungary
View GitHub Profile
@aedm
aedm / upload-to-backblaze.ts
Created October 2, 2024 16:17
Upload a file to Backblaze B2 and copy the URL to clipboard using Deno 2
import { parse } from "https://deno.land/[email protected]/flags/mod.ts";
import { writeText } from "https://deno.land/x/copy_paste/mod.ts";
import { basename } from "https://deno.land/[email protected]/path/mod.ts";
import B2 from 'npm:backblaze-b2';
// Read file name from command line arguments
const args = parse(Deno.args);
if (args._.length !== 1) {
console.error("Please provide a file path as an argument.");
Deno.exit(1);
@aedm
aedm / useful.md
Last active November 5, 2019 09:49
How to cook a giraffe

How to cook a giraffe

Oneliners I somehow found useful.

Docker

Docker container IP

Linux

docker inspect --format '{{ .NetworkSettings.IPAddress }}' mongo docker inspect -f '{{.Name}} - {{.NetworkSettings.IPAddress }}' $(docker ps -aq)

@aedm
aedm / kickstart-ubuntu-docker-mongodb.sh
Last active November 17, 2022 11:57
Installs Docker & Nginx on Ubuntu 16.04, starts MongoDB container
#!/bin/sh
# curl {URL to this script} | sh -s
# install docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker
@aedm
aedm / meteordeps.js
Last active January 5, 2018 07:33
This script displays dependency relations between packages required by a Meteor project
"use strict";
const execSync = require('child_process').execSync;
const fs = require('fs');
function run(command) {
return execSync(command).toString().trim();
}
console.log("Reading 'versions' file...");
"use strict";
let server = "http://localhost:3000/";
let parallelCount = 500;
let http = require("http");
http.globalAgent.maxSockets = parallelCount;
var queryCount = 0;
@aedm
aedm / configure-qt-static.cmd
Last active April 24, 2016 17:14
Small & quick Qt5 static configuration
configure \
-release \
-static \
-nomake examples \
-nomake tools \
-opensource \
-platform win32-msvc2015 \
-nomake tests \
-opengl desktop \
-skip qtwebkit \