Skip to content

Instantly share code, notes, and snippets.

View git-hub-tig's full-sized avatar
🌍
Seek True Soul Friends

TIG git-hub-tig

🌍
Seek True Soul Friends
View GitHub Profile
@nikias
nikias / limd-build-macos.sh
Last active July 22, 2026 19:35
Build libimobiledevice stack for macOS with ease
#!/bin/bash
# If you like this script and my work on libimobiledevice, please
# consider becoming a patron at https://patreon.com/nikias - Thanks <3
REV=1.0.22
if test "`echo -e Test`" != "Test" 2>&1; then
echo Please run this with zsh or bash.
exit 1
@mobeigi
mobeigi / tws.vmoptions
Created November 8, 2020 01:19
TWS VM Options
#
# This file contains VM parameters for Trader Workstation.
# Each parameter should be defined in a separate line and the
# last line must be followed by a line feed. No leading or
# trailing whitespaces are allowed in the same line, where a
# parameter is defined.
#
# Lines starting with a '#' character are treated as comments
# and ignored. Additionally, if a line contains a
# '### keep on update' string, all parameters defined below will
@jivanpal
jivanpal / kill-adobe-daemons.sh
Last active August 6, 2023 17:23
Stop Adobe Creative Cloud daemons (background processes) in their tracks
#!/bin/bash
if [ "$1" = "-s" ] || [ "$1" = "--show" ]; then
show=true
else
show=false
fi
if $show || [ "$1" = "-v" ] || [ "$1" = "--verbose" ]; then
verbose=true
import java.util.Arrays;
public class CountPairsWithOddSum {
public static void countPairs(int [] input){
System.out.println("Given Input: " + Arrays.toString(input));
int evenCount=0;
int oddCount=0;
@nomyfan
nomyfan / main.rs
Created March 23, 2020 14:50
WSL Broker
use std::io::Write;
use std::path::Path;
use std::process::Command;
fn main() {
let args: std::vec::Vec<String> = std::env::args().collect();
let bin_name = Path::new(&args[0]).file_stem().unwrap();
let mut cmd = Command::new("wsl");
@Sidelobe
Sidelobe / duplicate_line_xcode.md
Last active August 21, 2025 16:00 — forked from emotality/duplicate_line_xcode.md
Xcode - Duplicate Line key binding

Xcode line duplication (without overwriting your clipboard)

I find this shortcut extremely useful in Xcode: duplicate one or several lines without losing what you have on the clipboard.

UPDATE: it seems Xcode finally added this feature as of version 14: one can now select text and use the usual duplicate shortcut (Cmd-D)

Bind keys to duplicate lines in Xcode

  1. To add custom key bindings in Xcode, you have to edit this file (su privileges required): '/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/Current/Resources/IDETextKeyBindingSet.plist
@hohl
hohl / gist:eba551d34cda19bc694c0c36a3e076c8
Created January 17, 2020 09:51
Install Bazelisk for compiling Tensorflow 2.1
# Install Bazelisk.
sudo curl -Lo /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v1.2.1/bazelisk-linux-amd64
sudo chmod +x /usr/local/bin/bazel
# Verify Bazel installation
bazel version
@pknowledge
pknowledge / Shi_Tomasi_Corner_Detector_OpenCV.py
Created October 2, 2019 22:27
Shi_Tomasi_Corner_Detector_OpenCV
import numpy as np
import cv2 as cv
img = cv.imread('pic1.png')
gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
corners = cv.goodFeaturesToTrack(gray, 100, 0.01, 10)
corners = np.int0(corners)
@z-a-f
z-a-f / tin.py
Created July 31, 2019 16:31
Tiny ImageNet Dataset for PyTorch
import imageio
import numpy as np
import os
from collections import defaultdict
from torch.utils.data import Dataset
from tqdm.autonotebook import tqdm
dir_structure_help = r"""
@uogbuji
uogbuji / debian-pydev.md
Last active August 25, 2023 01:10
My Python dev setup for Linux (Debian, Ubuntu, Mint & ChromeOS/Crostini)

Python dev environment on Linux

User local install as much as possible, leaving system-wide kit (e.g. python & python-pip .debs) alone. Tested on Debian, Ubuntu, Mint & ChromeOS/Crostini.

Environment

Set up the dev environment (this is the only system-wide part):

sudo apt install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev openssl libgdbm-dev liblzma-dev libreadline-dev libncursesw5-dev libffi-dev uuid-dev