Skip to content

Instantly share code, notes, and snippets.

View y-fedorov's full-sized avatar
🧑‍💻

Yaroslav Fedorov y-fedorov

🧑‍💻
View GitHub Profile
//
// main.cpp
// How to copy class with pointers elegant way
// from: http://users.livejournal.com/_winnie/32542.html?thread=164126#t164126
//
// Created by Yaroslav Fedorov on 12/01/16.
// Copyright © 2016 Yaroslav Fedorov. All rights reserved.
//
#include <iostream>
@y-fedorov
y-fedorov / main.cpp
Created January 25, 2016 10:03
Test example - size of structure.
//
// main.cpp
//
// Created by Yaroslav Fedorov on 12/01/16.
// Copyright © 2016 Yaroslav Fedorov. All rights reserved.
//
#include <iostream>
struct A {
@y-fedorov
y-fedorov / promise.html
Created April 27, 2016 14:29
Javascript Promise example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test Promise code</title>
<script>
'use strict';
//Stage 1
var p1 = new Promise(function(resolve, reject) {
@y-fedorov
y-fedorov / dumpcl.c
Created August 19, 2016 07:58
Testing for OpenCL compatibility (MacOS)
//
// James @ http://stackoverflow.com/questions/7892955/how-can-i-test-for-opencl-compability
//
// clang -framework OpenCL dumpcl.c -o dumpcl && ./dumpcl
#include <stdio.h>
#include <stdlib.h>
#include <OpenCL/opencl.h>
% ssh -l latistaadmin <Build host IP>
# sudo -i
# apt-get update
# apt-get -f install
# useradd -m jenkins -d /var/jenkins -r -U
# su jenkins
$ cd /var/jenkins
@y-fedorov
y-fedorov / # tesseract - 2016-09-13_10-13-25.txt
Created September 13, 2016 07:19
tesseract on Mac OS X 10.11.6 - Homebrew build logs
Homebrew build logs for tesseract on Mac OS X 10.11.6
Build date: 2016-09-13 10:13:25
--
-- for command line osascript ./vpn_run.scpt and add permission to "security & privacy"
--
activate application "Cisco AnyConnect Secure Mobility Client"
tell application "System Events"
repeat until window 1 of process "Cisco AnyConnect Secure Mobility Client" exists
end repeat
tell process "Cisco AnyConnect Secure Mobility Client"
@y-fedorov
y-fedorov / vpn_run.scpt
Last active January 17, 2023 07:50
Cisco AnyConnect Secure Mobility Client on MacOS autofill password and connect (apple script) (version 2.0)
--
-- Yaroslav Fedorov <Y.Fedorov@reg40.net>
-- 11/14/2016
-- URL (http://indy-world.net/2016/11/cisco-anyconnect-secure-mobility-client-on-macos-autofill-password-and-connect-apple-script-version-2-0/)
set userLoginName to "<<user_login>>"
set keychainRecordName to "cisco_any_connect_auth"
set serverUri to "vpn.company.com"
on getPassword(keychainItemName)
Ctrl + a : move to start
Ctrl + e : move to end
Ctrl + xx : switch to start and back
Ctrl + w : cut left word to clipboard
Ctrl + k : cut from cursor to right to clipboard
Ctrl + u : cut from cursor to left to clipboard
Ctrl + y : paste
Ctrl + _ : undo
//
// main.cpp
// luxoft quiz application
//
// Created by Yaroslav Fedorov on 24/02/2017.
// Copyright © 2017 Yaroslav Fedorov. All rights reserved.
//
//
// LUXOFT task for C++ Russia 2017 contest