Skip to content

Instantly share code, notes, and snippets.

View jappa's full-sized avatar

Jamil Appa jappa

View GitHub Profile
@jappa
jappa / virt-manager-macos.md
Created November 22, 2023 15:50 — forked from davesilva/virt-manager-macos.md
Remote virt-manager from Mac OS

If you have a Linux machine with KVM on it, you can manage those VMs remotely from a Mac using virt-manager.

Step 1: Allow your user non-root access to KVM

SSH to the Linux machine and add your SSH user to the libvirt group

sudo usermod -a -G libvirt $(whoami)
@jappa
jappa / qt5.11-mojave.patch
Created November 22, 2018 15:28 — forked from sidneys/qt5.11-mojave.patch
qt5.11-mojave.patch
From 1e0848d745910e942907a81ca4743553ee8e635b Mon Sep 17 00:00:00 2001
From: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Date: Fri, 15 Jun 2018 23:15:10 +0200
Subject: [PATCH] macOS: Force light theme on macOS 10.14+
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
Until we can properly fix QPalette and QMacStyle,
we should disable dark appearance in Qt applications.
@jappa
jappa / fix_github_https_repo.sh
Created October 8, 2018 12:50 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@jappa
jappa / combineS3Files.py
Created April 11, 2018 21:08 — forked from jasonrdsouza/combineS3Files.py
Python script to efficiently concatenate S3 files
'''
This script performs efficient concatenation of files stored in S3. Given a
folder, output location, and optional suffix, all files with the given suffix
will be concatenated into one file stored in the output location.
Concatenation is performed within S3 when possible, falling back to local
operations when necessary.
Run `python combineS3Files.py -h` for more info.
'''
@jappa
jappa / docker-x11.bash
Created March 15, 2018 21:36 — forked from kiki67100/docker-x11.bash
Docker macOS X11 display
### Script to install xquartz and set the DISPLAY variable correctly, find the listen port and add current ip to connect to X11.
#skip if you want, install xquartz
brew cask reinstall xquartz
#get ip
IP=$(ifconfig|grep -E inet.*broad|awk '{ print $2; }')
#open XQuartz
open -a XQuartz &
#Go to preference Security check allow network, restart :
read -p "Go to preference Security check allow network and press a key to continue"
@jappa
jappa / integer_sequence.hpp
Last active February 5, 2023 00:24
A C++11 implementation of std::integer_sequence from C++14
#ifndef ___KOS_UTILITY_INTEGER_SEQUENCE__82DDD139689B8D73C15C6165472A8E14_HPP__
#define ___KOS_UTILITY_INTEGER_SEQUENCE__82DDD139689B8D73C15C6165472A8E14_HPP__
#include <type_traits>
#include <kos/namespaces.hpp>
KOS_BEGIN_HEADER
KOS_BEGIN_NAMESPACE
// A C++11 implementation of std::integer_sequence from C++14
template <typename T, T... N>
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@jappa
jappa / as
Last active August 29, 2015 14:18 — forked from xianyi/as
#!/bin/sh
HAS_INPUT_FILE=0
ARGS=$@
while [ $# -ne 0 ]; do
ARG=$1
# Skip options
if [ $ARG == "-arch" ] || [ $ARG == "-o" ]; then
# Skip next token
shift
shift
@jappa
jappa / gist:7890391
Created December 10, 2013 13:13 — forked from certik/gist:5723420
{
"metadata": {
"name": "VTK"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@jappa
jappa / s3_multipart_upload.py
Created July 23, 2012 20:32 — forked from fabiant7t/s3_multipart_upload.py
Parallel S3 multipart upload with retries
import logging
import math
import mimetypes
from multiprocessing import Pool
import os
from boto.s3.connection import S3Connection
from filechunkio import FileChunkIO