Skip to content

Instantly share code, notes, and snippets.

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

Evsyukov Denis juev

🏠
Working from home
View GitHub Profile
@juev
juev / gist:bdfcfcf7afef1352d30a6284199e1326
Created November 30, 2018 06:11 — forked from nateware/gist:3915757
Start Mac VNC server from command line
# Step 1: Set priveleges
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
Starting...
Setting allow all users to YES.
Setting all users privileges to 1073742079.
Done.
# Step 2: Allow VNC clients
@juev
juev / emacs.el
Created April 2, 2018 12:28 — forked from nilsdeppe/emacs.el
My Emacs init file
;;; 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.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@juev
juev / rbenv-howto.md
Created August 19, 2012 09:34 — forked from MicahElliott/rbenv-howto.md
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

@juev
juev / FtpClientConnectionTimeouts.groovy
Created January 15, 2018 08:03 — forked from axeda/FtpClientConnectionTimeouts.groovy
FtpClient Connection Timeouts
import org.apache.commons.net.ftp.*
import java.io.InputStream
import java.io.ByteArrayInputStream
String ftphost = "127.0.0.1"
String ftpuser = "test"
String ftppwd = "test"
int ftpport = 21
@juev
juev / Makefile
Created December 24, 2017 13:42 — forked from turtlemonvh/Makefile
Golang Project Makefile Template
# Borrowed from:
# https://github.com/silven/go-example/blob/master/Makefile
# https://vic.demuzere.be/articles/golang-makefile-crosscompile/
BINARY = superdo
VET_REPORT = vet.report
TEST_REPORT = tests.xml
GOARCH = amd64
VERSION?=?
@juev
juev / gist:3124344
Created July 16, 2012 18:57 — forked from saetia/gist:1623487
Clean Install – Mountain Lion OS X 10.8 DP3 Update 4
@juev
juev / gist:9d8e608023093bdecc1be958e63b09ee
Created September 25, 2017 13:07 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

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
juev / Main.java
Created September 22, 2017 11:37 — forked from rubenlagus/Main.java
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;
import java.io.IOException;
@juev
juev / RapidXmlExample.c
Created May 3, 2017 14:50 — forked from JSchaenzle/RapidXmlExample.c
RapidXml example parsing beer journal
#include <string.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <vector>
#include "rapidxml-1.13/rapidxml.hpp"
using namespace rapidxml;
using namespace std;