Skip to content

Instantly share code, notes, and snippets.

View carlozamagni's full-sized avatar
🎯
Focusing

Carlo Zamagni carlozamagni

🎯
Focusing
  • Technogym
  • Bologna
View GitHub Profile
@Skogsfrae
Skogsfrae / qml_live_reload.go
Last active September 4, 2020 12:04
Live reload for Qt QML development on go with QQmlApplicationEngine
package main
import (
"log"
"os"
"github.com/fsnotify/fsnotify"
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/gui"
"github.com/therecipe/qt/qml"
@Tynael
Tynael / README.md
Last active July 21, 2025 10:01
How to use npx to run gist based scripts
@iamarcel
iamarcel / Creating Neat .NET Core Command Line Apps.md
Last active November 28, 2023 10:41
Creating Neat .NET Core Command Line Apps

Creating Neat .NET Core Command Line Apps

You can now read this on my (pretty) website! Check it out here.

Every reason to get more HackerPoints™ is a good one, so today we're going to write a neat command line app in .NET Core! The Common library has a really cool package Microsoft.Extensions.CommandlineUtils to help us parse command line arguments and structure our app, but sadly it's undocumented.

No more! In this guide, we'll explore the package and write a really neat

@mcollina
mcollina / settuning.sh
Last active April 16, 2024 17:12
m3medium config
#!/bin/bash
sysctl net.core.rmem_default=268435456
sysctl net.core.wmem_default=268435456
sysctl net.core.rmem_max=268435456
sysctl net.core.wmem_max=268435456
sysctl net.core.netdev_max_backlog=100000
sysctl "net.ipv4.tcp_rmem=4096 16384 134217728"
sysctl "net.ipv4.tcp_wmem=4096 16384 134217728"
sysctl "net.ipv4.tcp_mem=786432 1048576 268435456"
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@staltz
staltz / introrx.md
Last active August 14, 2025 01:40
The introduction to Reactive Programming you've been missing
char srvIP[] = "256.256.256.256";
char srvHost[] = "myhost.mydomain.tld";
int srvPort = 80;
char srvPath[] = "/?l=test1";
void setup() {
delay(5000);
pinMode(D7, OUTPUT);
@aodin
aodin / gist:9493190
Last active March 23, 2024 20:24
Parsing JSON in a request body with Go
package main
import (
"encoding/json"
"io/ioutil"
"log"
"net/http"
)
type Message struct {
@MrDrews
MrDrews / Default.sublime-theme
Created April 24, 2013 14:56
Solarized (dark) -- Complement the stock Solarized (dark) theme in sublime text 3 by placing this `Default.sublime-theme` inside the `Packages/User` folder. It will recolor the sidebar.
[
{
"class": "sidebar_container",
// $base01: #586e75
"layer0.tint": [88,110,117],
"layer0.opacity": 1.0,
"layer0.draw_center": false,
"layer0.inner_margin": [0, 0, 1, 0],
"content_margin": [0, 0, 1, 0]
@gianni-di-noia
gianni-di-noia / twitter.py
Created September 17, 2012 13:53
Twitter OAuth handler (gae/py, webapp2, tweepy)
import webapp2, tweepy
consumer_token = 'CONSUMER KEY'
consumer_secret = 'CONSUMER SECRET'
auth = tweepy.OAuthHandler(consumer_token, consumer_secret)
class Twitter(webapp2.RequestHandler):
def get(self):
oauth_token = self.request.get("oauth_token")
oauth_verifier = self.request.get("oauth_verifier")