Skip to content

Instantly share code, notes, and snippets.

Working from home

Evsyukov Denis juev

Working from home
View GitHub Profile
juev / emacs.el
Created Apr 2, 2018 — forked from nilsdeppe/emacs.el
My Emacs init file
View emacs.el
;;; initfile --- Summary:
;;; Commentary:
;; Emacs 25.1 and newer tested
;;; Code:
;; Configuration/Customization:
;; Defines global variables that are later used to customize and set
;; up packages.
View FtpClientConnectionTimeouts.groovy
String ftphost = ""
String ftpuser = "test"
String ftppwd = "test"
int ftpport = 21
juev / Makefile
Created Dec 24, 2017 — forked from turtlemonvh/Makefile
Golang Project Makefile Template
View Makefile
# Borrowed from:
BINARY = superdo
TEST_REPORT = tests.xml
GOARCH = amd64
juev / gist:9d8e608023093bdecc1be958e63b09ee
Created Sep 25, 2017 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.
View gist:9d8e608023093bdecc1be958e63b09ee

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
juev /
Created Sep 22, 2017 — forked from rubenlagus/
Example of sending a SendMessage method using Telegram API with ReplyMarkupKeyboard
package org.telegram.example.SendMessage;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONObject;
juev / RapidXmlExample.c
Created May 3, 2017 — forked from JSchaenzle/RapidXmlExample.c
RapidXml example parsing beer journal
View RapidXmlExample.c
#include <string.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <vector>
#include "rapidxml-1.13/rapidxml.hpp"
using namespace rapidxml;
using namespace std;
juev / mkdio.h++
Created Apr 22, 2017 — forked from Orc/mkdio.h++
c++ header for discount -- trivially tested (the header compiles, a open/format test program works)
View mkdio.h++
#ifndef _MKDIO_CXX
#define _MKDIO_CXX
extern "C" {
#include <stdio.h>
#include <mkdio.h>
class MKIOT {


To configure a IPFW firewall, first open up rc.conf with:

sudo ee /etc/rc.conf

Now add the following lines to the end of this file, where the ssh port number is the most important port number to add and should be replaced with the port number chosen whilst configuring the SSH (not doing so will lock out all SSH users from the system. Each port that is required should be listed in the port number area (port 80 might also be useful to add as it is a standard port for http connections, as is port 443 for https that might also be useful to add) and firewall_logdeny will tell the server to log any connection attept to the /var/log/security file:

View reading_time.rb
# Outputs the reading time
# Read this in “about 4 minutes”
# Put into your _plugins dir in your Jekyll site
# Usage: Read this in about {{ page.content | reading_time }}
module ReadingTimeFilter
def reading_time( input )
words_per_minute = 180
View gist:d084049ba3e07b2ee7f6
// Minimal HTTP server in 0MQ
#include "czmq.h"
int main (void)
zctx_t *ctx = zctx_new ();
void *router = zsocket_new (ctx, ZMQ_ROUTER);
zsocket_set_router_raw (router, 1);
int rc = zsocket_bind (router, "tcp://*:8080");
assert (rc != -1);