Skip to content

Instantly share code, notes, and snippets.

View jabbalaci's full-sized avatar

Laszlo Szathmary jabbalaci

View GitHub Profile
@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
@kripken
kripken / hello_world.c
Last active March 19, 2025 06:14
Standalone WebAssembly Example
int doubler(int x) {
return 2 * x;
}
@nepsilon
nepsilon / how-to-app-siege-load-test.md
Last active February 19, 2017 12:45
How to test your webapp for heavy traffic? — First published in fullweb.io issue #24

How to test your web app for heavy traffic?

Load testing is a good way to understand your website or web app behaviour under high traffic. Here is how to use siege, a simple CLI tool.

Note: Use siege only on sites you own as its traffic could be interpreted as a DDOS attack.

Using 100 concurrent requests and up to 3 seconds between requests:

@joepie91
joepie91 / getting-started.md
Last active July 7, 2024 02:41
Getting started with Node.js

"How do I get started with Node?" is a commonly heard question in #Node.js. This gist is an attempt to compile some of the answers to that question. It's a perpetual work-in-progress.

And if this list didn't quite answer your questions, I'm available for tutoring and code review! A donation is also welcome :)

Setting expectations

Before you get started learning about JavaScript and Node.js, there's one very important article you need to read: Teach Yourself Programming in Ten Years.

Understand that it's going to take time to learn Node.js, just like it would take time to learn any other specialized topic - and that you're not going to learn effectively just by reading things, or following tutorials or courses. _Get out there and build things!

@saleph
saleph / centering.py
Last active August 8, 2022 05:20
[qt5] center a window on screen
__author__ = 'tom'
import sys
from PyQt5.QtWidgets import QWidget, QDesktopWidget, QApplication
class Example(QWidget):
def __init__(self):
super().__init__()
self.init_ui()
@Tblue
Tblue / mozlz4a.py
Last active April 8, 2025 15:33
MozLz4a compression/decompression utility
#!/usr/bin/env python3
# vim: sw=4 ts=4 et tw=100 cc=+1
#
####################################################################################################
# DESCRIPTION #
####################################################################################################
#
# Decompressor/compressor for files in Mozilla's "mozLz4" format. Firefox uses this file format to
# compress e. g. bookmark backups (*.jsonlz4).
#
@codemedic
codemedic / konsole-with-palette-colours.css
Last active September 24, 2024 13:25
CSS for KDE Konsole minimal, lighter, dark tabs
QTabBar,
QTabBar::tab
{
font-family: "Noto Sans";
font-size: 11px;
height: 16px;
padding: 2px;
border: 0px;
border-bottom: 3px solid palette(dark);
background-color: palette(dark);
@Jacoby6000
Jacoby6000 / gist:3b24d8397491c0f92cb4
Last active August 29, 2015 14:16
Scala extension methods
object Implicits {
implicit class PimpedString(str: String) {
def everyNthChar(skipNum: Int) = (for (i <- 0 until str.length if i%skipNum==0) yield str(i)).mkString
//Other methods I want strings to have go here
}
implicit class PimpedInt(int: Int){
//Other methods I want ints to have do here
}
}
@def-
def- / example.nim
Last active November 15, 2018 00:28
Reading a single character with Nim
import getch
let ch = getch()
echo ch