Skip to content

Instantly share code, notes, and snippets.

@vvavrychuk
vvavrychuk / connman_cisco_anyconnect.rst
Last active August 5, 2022 03:44
Connecting to Cisco AnyConnect VPN using connman

It is possible to connect to Cisco AnyConnect VPN using connman.

First of all connman-vpn should be installed:

apt install connman connman-vpn
systemctl disable NetworkManager

Later is required because it is not possible to completely remove NetworkManager because too many packages depend on it.

--- /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant.orig 2017-09-25 16:36:33.861123204 +0000
+++ /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant 2017-09-25 16:37:58.590462366 +0000
@@ -111,6 +111,13 @@
type wpa_supplicant >/dev/null 2>&1 && \
type wpa_cli >/dev/null 2>&1
then
+ case $interface in
+ p2p-*)
+ syslog info "skipping wpa_supplicant hook for $interface"
+ return 0
#include <winsock2.h>
#include <ws2tcpip.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
WSADATA wsaData;
if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0) {
fprintf(stderr, "WSAStartup failed.\n");
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include <WinSock2.h>
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
WSADATA wsaData = { 0 };
WSAStartup(MAKEWORD(2, 2), &wsaData);
SOCKET sock = socket(AF_INET, SOCK_DGRAM, 0);
#!/usr/bin/python
"""
Extends git assume unchanged feature to work with directories. For convenience add alias in your gitconfig
[alias]
assume-unchanged = !git-assume-unchanged.py
Usage:
- git assume-unchanged path - assume unchanged all files in the path
- git assume-unchanged -n|--no path - unassume unchanged all files in the path
@vvavrychuk
vvavrychuk / Vagrantfile
Last active August 15, 2016 09:19
lime-qml vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get -y install git golang libonig-dev libonig2 mercurial python3.5 python3.5-dev
apt-get -y install libqt5opengl5-dev libqt5qml-graphicaleffects qtbase5-private-dev \
qtdeclarative5-controls-plugin qtdeclarative5-dev qtdeclarative5-dialogs-plugin \
qtdeclarative5-qtquick2-plugin qtdeclarative5-quicklayouts-plugin qtdeclarative5-window-plugin
SHELL
ubuntu@ubuntu-xenial:~/golang/src/github.com/limetext/lime-qml$ ./main/main
[08/15/16 09:06:18] [INFO] Initializing
[08/15/16 09:06:18] [DEBG] OnInit callbacks executing
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x25 pc=0x7fd3c2742f81]
runtime stack:
runtime.throw(0x94b8c0, 0x2a)
/usr/lib/go-1.6/src/runtime/panic.go:547 +0x90
runtime.sigpanic()
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
@vvavrychuk
vvavrychuk / pom.xml
Created January 28, 2016 14:24
maven-compiler-plugin Java 8
<project>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>