Skip to content

Instantly share code, notes, and snippets.

Avatar
🏳️‍🌈
Codin them thangs

Kylie Auld kylieCat

🏳️‍🌈
Codin them thangs
View GitHub Profile
@philpoore
philpoore / time-docker-build.sh
Created Sep 5, 2018
Generate JSON output of docker build step timing, useful for profiling
View time-docker-build.sh
#!/bin/bash
# script: time-docker-build.sh
#
# All command line arguments are passed to docker build command.
#
# usage: ./time-docker-build.sh
#
DATE_FORMAT="+%s"
@enricofoltran
enricofoltran / main.go
Last active May 15, 2021
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@Pathoschild
Pathoschild / stardew-mod-recommendations.md
Last active Apr 16, 2021
Stardew Valley mod recommendations
View stardew-mod-recommendations.md

Here are the mods I recommend. These are all compatible with the latest versions of SMAPI and Stardew Valley on Linux/Mac/Windows. See the player's guide to using mods if you're interested.

Quality of life

I think the best mods are those which improve the game while maintaining its balance, lore, and style.

  • Better Sprinklers
    Customise the sprinkler radius, with a proportional change to their cost. If you're willing to mine all the ores you'll need, that makes the basic sprinklers useful early in the game and lets you do more than just watering crops every day.

  • Billboard Anywhere
    View the calendar and daily quest anywhere. See upcoming birthdays and festivals without needing to walk to the nearest calendar.

@chilts
chilts / dump.go
Created Sep 15, 2016
Dump entire BoltDB to stdout, including Nested Buckets
View dump.go
package main
import (
"fmt"
"log"
"strings"
"time"
"github.com/boltdb/bolt"
)
@boaz0
boaz0 / main.go
Last active Mar 4, 2021
Detect compression type in Golang
View main.go
package main
import (
"flag"
"log"
"net/http"
"os"
"strings"
)
@gabrielfalcao
gabrielfalcao / get-free-tcp-port.py
Created Oct 31, 2015
Getting a random free tcp port in python using sockets
View get-free-tcp-port.py
# Getting a random free tcp port in python using sockets
def get_free_tcp_port():
tcp = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcp.bind(('', 0))
addr, port = tcp.getsockname()
tcp.close()
return port
@mdwhatcott
mdwhatcott / custom_json.go
Created Jul 29, 2015
Example of implementing MarshalJSON and UnmarshalJSON to serialize and deserialize custom types to JSON in Go. Playground: http://play.golang.org/p/7nk5ZEbVLw
View custom_json.go
package main
import (
"bytes"
"encoding/json"
"fmt"
"strconv"
)
func main() {
@svett
svett / subcommand.go
Created Jul 4, 2015
flag package: subcommand example
View subcommand.go
package main
import (
"flag"
"fmt"
"os"
)
func main() {
askCommand := flag.NewFlagSet("ask", flag.ExitOnError)
@jennyd
jennyd / falcon-logging-middleware.py
Last active Feb 9, 2021
Falcon logging middleware
View falcon-logging-middleware.py
import falcon
import logging
logger = logging.getLogger(__name__)
logger.addHandler(logging.FileHandler('test.log'))
logger.setLevel(logging.INFO)
class ResponseLoggerMiddleware(object):
def process_response(self, req, resp):
logger.info('{0} {1} {2}'.format(req.method, req.relative_uri, resp.status[:3]))
@iamnewton
iamnewton / bash-colors.md
Last active May 14, 2021
The entire table of ANSI color codes.
View bash-colors.md

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple