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.
git config --global core.whitespace trailing-space,space-before-tab
git config --global apply.whitespace fix
# Revert submodule
git submodule update --init shared/thrust
@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 / SlurmNotes.txt
Created June 30, 2017 19:40
Slurm test
cat << EOF > test.sh
#!/bin/sh
echo $(hostname): $(ulimit -l)
EOF
srun -N 2 test.sh
#!/bin/bash
# Copyright 2017 Théo Chamley
# 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:
#
# The above copyright notice and this permission notice shall be included in all copies or
@jappa
jappa / dmesg.py
Last active June 30, 2016 10:54
Converts dmesg time stamp to human readable form
#!/usr/bin/env python
# coding=utf8
# Copyright (C) 2010 Saúl ibarra Corretgé &lt;saghul@gmail.com&gt;
#
"""
pydmesg: dmesg with human-readable timestamps
"""
@jappa
jappa / custom.js
Created June 22, 2016 20:30
.jupyter/custom/custom.js used to hide code cells
code_show=true;
function code_toggle() {
if (code_show){
$('div.input').hide();
} else {
$('div.input').show();
}
code_show = !code_show
}