Skip to content

Instantly share code, notes, and snippets.

kostyll

Block or report user

Report or block kostyll

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kostyll
kostyll / galera_cluster.yml
Created May 14, 2018 — forked from lucidfrontier45/galera_cluster.yml
docker-compose file for mariadb galera cluster
View galera_cluster.yml
node1:
image: hauptmedia/mariadb:10.1
hostname: node1
ports:
- 13306:3306
environment:
- MYSQL_ROOT_PASSWORD=test
- REPLICATION_PASSWORD=test
- MYSQL_DATABASE=maria
- MYSQL_USER=maria
@kostyll
kostyll / serve_http.py
Created May 2, 2018 — forked from pankajp/serve_http.py
Simple Python HTTP Server with multi-threading and partial-content support
View serve_http.py
#! /usr/bin/env python
# Standard library imports.
from SocketServer import ThreadingMixIn
import BaseHTTPServer
import SimpleHTTPServer
import sys
import json
import os
from os.path import (join, exists, dirname, abspath, isabs, sep, walk, splitext,
@kostyll
kostyll / dummy-web-server.py
Created Jan 8, 2018 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
View dummy-web-server.py
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost
@kostyll
kostyll / socket.c
Created Jan 8, 2018 — forked from nolim1t/socket.c
HTTP Request in C using low level write to socket functionality
View socket.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
@kostyll
kostyll / general_vps.sh
Last active Dec 29, 2017
docker docker-compose installation (+tmux mosh)
View general_vps.sh
#!/bin/bash
echo "general install ..."
apt-get update && apt-get install rsync tmux mosh wget curl -y
apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common \
@kostyll
kostyll / stack.c
Created Apr 13, 2017 — forked from pseudomuto/stack.c
Blog Code: Implementing a Generic Stack in C
View stack.c
#include <stdlib.h>
#include <assert.h>
#include "stack.h"
void stack_new(stack *s, int elementSize, freeFunction freeFn)
{
s->list = malloc(sizeof(list));
// make sure the malloc call didn't fail...
assert(s->list != NULL);
@kostyll
kostyll / list.c
Created Apr 13, 2017 — forked from pseudomuto/list.c
Blog Code: Implementing a Generic Linked List in C
View list.c
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "list.h"
void list_new(list *list, int elementSize, freeFunction freeFn)
{
assert(elementSize > 0);
list->logicalLength = 0;
View wifi-connection-timeout.txt
echo "options iwlwifi 11n_disable=1 wd_disable=1" | sudo tee /etc/modprobe.d/iwlwifi.conf
sudo modprobe -rv iwlwifi
sudo modprobe -v iwlwifi 11n_disable=8
echo "options iwlwifi 11n_disable=8" | sudo tee -a /etc/modprobe.d/iwlwifi.conf
@kostyll
kostyll / autogen.sh
Last active Dec 27, 2016
autogen.sh
View autogen.sh
#!/bin/sh -x
rm -fv ltmain.sh config.sub config.guess config.h.in
mkdir -p m4
aclocal -I m4
autoheader
libtoolize --automake --copy
automake --add-missing --copy --force
autoreconf
chmod 755 configure
@kostyll
kostyll / _service.md
Created Nov 17, 2016 — forked from naholyr/_service.md
Sample /etc/init.d script
View _service.md

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
You can’t perform that action at this time.