Skip to content

Instantly share code, notes, and snippets.

@bugQ
bugQ / build_openssl_a.sh
Created March 12, 2012 19:05 — forked from tmiz/build_openssl_dylib.sh
Build latest OpenSSL Universal Binary on OSX (static)
#!/bin/bash
OPENSSL_VERSION="1.0.0e"
curl -O http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_i386
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_x86_64
cd openssl_i386
./Configure darwin-i386-cc
@leonbreedt
leonbreedt / iTermColorsToTerminalColors.swift
Last active May 16, 2024 19:50
Convert iTerm2 color scheme to Terminal.app color scheme. To use, just save to disk and run it like you would any script. NOTE: Needs Xcode 8.0 or later, since it has been ported to Swift 3.0.
#!/usr/bin/xcrun swift
//
// Copyright © 2016 Leon Breedt
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
@jun66j5
jun66j5 / main.m
Last active July 25, 2021 08:58
Redirect stdout/stderr to NSLog on iOS Simulator
#include <unistd.h>
static int redirect_nslog(const char *prefix, const char *buffer, int size)
{
NSLog(@"%s (%d bytes): %.*s", prefix, size, size, buffer);
return size;
}
static int stderr_redirect_nslog(void *inFD, const char *buffer, int size)
{
@cryzed
cryzed / fix-infinality.md
Last active June 24, 2024 02:24
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@zakkak
zakkak / disable_panel_shadow.sh
Created April 11, 2017 08:55 — forked from alibitek/disable_panel_shadow.sh
Disable KDE panel shadow. Script to be placed in ~/.kde/Autostart/disable_panel_shadow.sh https://forum.kde.org/viewtopic.php?f=285&t=121592
for WID in `xwininfo -root -tree | sed '/"plasma-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'`; do
xprop -id $WID -remove _KDE_NET_WM_SHADOW
done
# or
for WID in `xwininfo -root -tree | sed '/"Plasma": ("plasmashell" "plasmashell")/!d; s/^ *\([^ ]*\) .*/\1/g'`; do
xprop -id $WID -remove _KDE_NET_WM_SHADOW
done
@segabor
segabor / gist:cd08eae2ce8717a1e4f8476687d98221
Created September 4, 2018 08:59
Build Swift 4.2-dev on Arch Linux
#!/bin/bash
# Build Swift on Arch Linux
# Original post I followed https://akrabat.com/compiling-swift-on-linux/.
# [1] Checking out repo
mkdir swift-dev
cd swift-dev/
git clone git@github.com:apple/swift.git
@zhuowei
zhuowei / safariinject.m
Last active October 22, 2021 17:15
Restores old tab bar in Safari 15.0 (16612.1.29.41.4, 16612)
// Restores old tab bar in Safari 15.0 (16612.1.29.41.4, 16612)
// clang -fmodules -shared -Wall -Os -o libsafariinject.dylib safariinject.m
//
// If SIP off:
// DYLD_INSERT_LIBRARIES=$PWD/libsafariinject.dylib /Applications/Safari.app/Contents/MacOS/Safari
//
// If SIP on, you can demo this by manually removing Safari's code signing signature, but many
// features (eg saved logins) won't be readable by the resigned app:
// cp -a /Applications/Safari.app ./
// codesign --remove Safari.app/Contents/MacOS/Safari