Skip to content

Instantly share code, notes, and snippets.

View jabbalaci's full-sized avatar

Laszlo Szathmary jabbalaci

View GitHub Profile
@smvd
smvd / FlappyBird.c
Last active May 18, 2024 17:17
flappy bird writen in c running in the terminal
/*
_ _ _ _____ _ ____ _
| \ | | ___ | |_ | ___| | __ _ _ __ _ __ _ _ | _ \ _ _ ___| | __
| \| |/ _ \| __| | |_ | |/ _` | '_ \| '_ \| | | | | | | | | | |/ __| |/ /
| |\ | (_) | |_ | _| | | (_| | |_) | |_) | |_| | | |_| | |_| | (__| <
|_| \_|\___/ \__| |_| |_|\__,_| .__/| .__/ \__, | |____/ \__,_|\___|_|\_\
|_| |_| |___/
compiler : GCC
command : gcc source.c -o FlappyBird.exe -Werror -Wall -W -s
license : www.unlicense.org (Please credit my channel tho)
@tbjgolden
tbjgolden / inotify-instructions.md
Last active April 6, 2024 07:13
[Arch Linux] [Manjaro] How to avoid "Visual Studio Code is unable to watch for file changes in this large workspace" (error ENOSPC)

To avoid this error, we need to increase the inotify watcher limit.

The way to do this is different on Arch based distributions than other Linux distributions.

Instructions for Arch Linux/Manjaro

Check for an already existing inotify config file (recent versions of Manjaro include one)

@prantlf
prantlf / main_test.go
Last active March 3, 2023 17:47
Tests and benchmarks for formatting integers with commas separating thousands
// Save this file as main_test.go and run "go test -bench ."
package main
import (
"bytes"
"fmt"
"regexp"
"strconv"
"testing"
@AlmogBaku
AlmogBaku / bitly.go
Last active May 8, 2024 15:36
Golang Bitly: simple, stupid shortener written in go
package bitly
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
const BaseURL = "https://api-ssl.bitly.com/v4"
import matplotlib.pyplot as plt
from PyQt5 import QtCore
import numpy as np
import time
import math
class VisualiseFrequency(QtCore.QThread):
def __init__(self, song, canvas, player):
@asukakenji
asukakenji / go-stdlib-interface-selected.md
Last active May 30, 2024 21:07
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@magnetikonline
magnetikonline / README.md
Last active March 9, 2022 05:38
Python function - test if given file is considered binary.

Python function - is file binary?

Function which determines if a given file is binary.

Test is based on the following algorithm (similar to that implemented within Perl):

  • Empty files are considered text.
  • If not empty, read up to 512 bytes as a buffer. File will be binary if:
    • Null byte is encountered.
    • More than 30% of the buffer consists of "non text" characters.
@toddlers
toddlers / fileinfo.go
Created January 25, 2017 13:08
getting fileinfo in go
package main
import (
"fmt"
"os"
)
func main() {
// can handle symbolic link, but will no follow the link