Skip to content

Instantly share code, notes, and snippets.

View MrCsabaToth's full-sized avatar
🏠
Working from home

Csaba Toth MrCsabaToth

🏠
Working from home
View GitHub Profile
@sr75
sr75 / my.cnf.txt
Created June 6, 2012 22:59
mysql-innodb-large-server-example-configuration
# *** Application-specific options follow here ***
#
# The MySQL server
#
[mysqld]
# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
@orenitamar
orenitamar / country_codes.json
Created July 30, 2012 15:04
Two letter country code mapping, grouped by continent/region
{
"europe": {
"va": "vatican city",
"ch": "switzerland",
"ad": "andorra",
"ee": "estonia",
"is": "iceland",
"am": "armenia",
"al": "albania",
"cz": "czech republic",
public static class Coroutine {
public static void BeginExecute(IEnumerable<Promise> enumerable) {
MoveNext(enumerable.GetEnumerator());
}
static void MoveNext(IEnumerator<Promise> enumerator) {
if (enumerator.MoveNext()) {
var promise = enumerator.Current;
promise.Current = promise.Task();
promise.Current._CallBack = () => MoveNext(enumerator);
@bittner
bittner / 60-jetbrains.conf
Created September 25, 2015 07:57
Inotify configuration for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). Create this file with e.g. `sudo vim /etc/sysctl.d/60-jetbrains.conf`
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm).
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and
# run `sudo service procps start` or reboot.
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
#
# More information resources:
# -$ man inotify # manpage
# -$ man sysctl.conf # manpage
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use
@skratchdot
skratchdot / donate.md
Created January 25, 2016 17:42
My Paypal donate button in markdown format

Donation Button

Donate

@Keda87
Keda87 / mixins.py
Last active March 21, 2018 05:54
Django model mixin class to extends django-storages (https://github.com/jschneier/django-storages) ability to backup media files to local storage.
import os
from django.conf import settings
from django.core.files import File
from django.core.files.storage import FileSystemStorage
class LocalMediaSaveMixin(object):
"""Mixin class to for backing up media files on model that has
image/file fields. To use it, ensure to keep in my python multiple
@dmpayton
dmpayton / cmd.sketch
Created April 26, 2017 02:23
Fresno.py arduino sketch
String incomingByte = ""; // for incoming serial data
bool blinking = false;
int blinkSpeed = 100;
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
}
@mfd
mfd / GTWalsheimPro.css
Last active May 31, 2025 16:34
GT Walsheim Pro
@font-face {
font-family: GT Walsheim Pro;
src: local("GT Walsheim Pro Regular"),local("GTWalsheimProRegular"),url(GTWalsheimProRegular.woff2) format("woff2"),url(GTWalsheimProRegular.woff) format("woff"),url(GTWalsheimProRegular.ttf) format("truetype");
font-weight: 400;
font-style: normal
}
@font-face {
font-family: GT Walsheim Pro;
src: local("GT Walsheim Pro Bold"),local("GTWalsheimProBold"),url(GTWalsheimProBold.woff2) format("woff2"),url(GTWalsheimProBold.woff) format("woff"),url(GTWalsheimProBold.ttf) format("truetype");
#!/usr/bin/bash
url=$1
soap_head='<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:GetGenericPortMappingEntry xmlns:u="urn:upnporg:serviceId:WANIPConnection.1#GetGenericPortMappingEntry"><NewPortMappingIndex>'
soap_tail='</NewPortMappingIndex></u:GetGenericPortMappingEntry></s:Body></s:Envelope>'
for i in `seq 0 10`; do
payload=$soap_head$i$soap_tail
curl -H 'Content-Type: "text/xml;charset=UTF-8"' -H 'SOAPACTION: "urn:schemasupnp-org:service:WANIPConnection:1#GetGenericPortMappingEntry"' --data "$payload" "$url"
echo ""
done
@attilavago
attilavago / dictionary.md
Last active May 12, 2023 14:37
Design-Name - Accessible-Name Dictionary
Design Name Accessible Name Code Example Reference Materials Notes
Floating action button (fab) Button <button> don't give it a tabindex higher than zero
Slider Input, Range <input type='range'/>
Switch Checkbox <input type="checkbox">
Breadcrumb Link <a href="some-step">
Stepper there isn't one focus on describing the experience and make the step contents semantic, maybe use anchor links
Tabs ARIA Tabpanel, Tablist, Tab Tabs example
Card doesn't exist focus on making its content semantic, and if it's a list of cards, make sure the list is semantic and parsable, or use article if it makes sense
Accordion doesn't exist Accordion example focus on making its content semantic and navigable