Skip to content

Instantly share code, notes, and snippets.

View kafeg's full-sized avatar
💭
In C++ we trust!

Vitaly kafeg

💭
In C++ we trust!
View GitHub Profile
@kafeg
kafeg / xcode-uninstall.sh
Created October 27, 2023 18:31 — forked from roalcantara/xcode-uninstall.sh
xcode-uninstall
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf /Applications/Xcode.app
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf ~/Library/Developer
rm -rf ~/Library/MobileDevice
rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist
@kafeg
kafeg / QtArm64Patch.patch
Created October 23, 2023 21:39 — forked from thomaslmiller/QtArm64Patch.patch
Diff for Qt5 dev branch for building Arm64 Windows Desktop Apps
Submodule qtbase 519fcb38a2..705dee9621:
diff --git a/qtbase/mkspecs/common/msvc-desktop.conf b/qtbase/mkspecs/common/msvc-desktop.conf
index b7d2eecc82..755d92149c 100644
--- a/qtbase/mkspecs/common/msvc-desktop.conf
+++ b/qtbase/mkspecs/common/msvc-desktop.conf
@@ -22,6 +22,10 @@ contains(QMAKE_TARGET.arch, x86_64) {
DEFINES += WIN64
QMAKE_COMPILER_DEFINES += _WIN64
}
+contains(QMAKE_TARGET.arch, arm64) {
@kafeg
kafeg / gist:d502389fcf77b5beb3881aa463865787
Created October 21, 2023 10:08 — forked from sebsto/gist:6af5bf3acaf25c00dd938c3bbe722cc1
Start VNCServer on Mac1 EC2 Instance
# YouTube (english) : https://www.youtube.com/watch?v=FtU2_bBfSgM
# YouTube (french) : https://www.youtube.com/watch?v=VjnaVBnERDU
#
# On your laptop, connect to the Mac instance with SSH (similar to Linux instances)
#
ssh -i <your private key.pem> ec2-user@<your public ip address>
#
# On the Mac
@kafeg
kafeg / dockerpi-modify.sh
Created January 12, 2022 22:18
Shell script for modify dockerpi image and install there required packages on first boot.
#/bin/bash
#set -x
#ZIP_URL="http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2015-11-24/2015-11-21-raspbian-jessie-lite.zip"
#ZIP_NAME="2015-11-21-raspbian-jessie-lite.zip"
#IMG_NAME="2015-11-21-raspbian-jessie-lite.img"
ZIP_URL="http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2019-09-30/2019-09-26-raspbian-buster-lite.zip"
@kafeg
kafeg / Dockerfile.vcpkg.qt5-base.alpine
Last active December 10, 2021 17:38
Build qt5-base vcpkg package in Alpine Linux environment with all required dependencies
FROM alpine:3
RUN apk add --no-cache libc6-compat cmake ninja git gcc g++ libc-dev \
yasm bash curl make linux-headers curl zip unzip tar \
patch libx11-dev libx11-dev mesa mesa-dev libxi-dev \
libxext-dev autoconf gettext gettext-dev libxkbcommon-dev \
bison pkgconfig gperf python3 glu glu-dev mesa-gl libxcb \
libxcb-dev libxkbcommon libxkbcommon-dev libxkbcommon-x11 \
xcb-util-wm-dev xcb-util-image-dev xcb-util-keysyms-dev \
xcb-util-cursor-dev xcb-util-renderutil-dev xcb-util-xrm-dev \
@kafeg
kafeg / main.cpp
Created August 25, 2021 09:07
Qt UTF-8 arguments, Windows
#include <QCoreApplication>
#include <QDebug>
#include <windows.h>
#include <shellapi.h>
int utf8Main(int argc, char *argv[])
{
QStringList utf8Args;
for (int i = 0; i != argc; ++i)
@kafeg
kafeg / main.go
Last active October 16, 2020 09:35
Parser for Online Lada Sklad http://sklad.lada-direct.ru/v2/cars/vesta/sw-cross/prices.html for all cities to find required car complectation (Ugly MVP)
package main
import (
"github.com/PuerkitoBio/goquery"
"github.com/geziyor/geziyor"
"github.com/geziyor/geziyor/client"
"github.com/tidwall/gjson"
"log"
"os"
"strings"
@kafeg
kafeg / admobctl.cpp
Last active November 11, 2015 13:41
Qt Quick QML AdMob Android iOS Realisation: http://forsk.ru (based on https://github.com/yevgeniy-logachev/QtAdMob)
#include "admobctl.h"
#include "QtAdMob/QtAdMobBanner.h"
#include "QtAdMob/QtAdMobInterstitial.h"
#include <QtQml>
#include <QDebug>
#include <QTimer>
AdMobCtl::AdMobCtl(QObject *parent) : QObject(parent)
{
m_Banner = CreateQtAdMobBanner();
@kafeg
kafeg / NavigationDrawer.qml
Last active September 7, 2015 05:33 — forked from jbache/NavigationDrawer.qml
Qt Quick Navigation Drawer
/*
Copyright (c) 2014 Cutehacks A/S
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@kafeg
kafeg / kfproxy.py
Created September 1, 2015 05:45
Simply python proxy
# demo: http://forsk.ru:8232/company/yandex/blog/258673/
# pip install html5lib beautifulsoup4
# -*- coding: utf-8 -*-
import BaseHTTPServer
import requests
import string
from bs4 import BeautifulSoup
def main():
httpd = BaseHTTPServer.HTTPServer(('0.0.0.0', 8232), TMHandler)