Skip to content

Instantly share code, notes, and snippets.

@Edenharder
Edenharder / buildkernel.jl
Created January 16, 2022 18:51 — forked from terasakisatoshi/buildkernel.jl
Improving first call latency of Plots.jl on Jupyter Notebook using PackageCompiler.jl
using PackageCompiler
using IJulia
precompile_statements_file=[
joinpath(expanduser("~/.julia"), "ijuliacompile.jl")
]
sysimage_path=joinpath(
expanduser("~/.julia"),
@Lili1228
Lili1228 / convert.sh
Last active September 1, 2023 17:54
Convert Manjaro to Arch
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Tested on freshly installed Manjaro 22.0.5 Gnome.
pamac build trizen
cat >/tmp/convert.sh <<EOF
pacman -Qq | grep pamac | xargs pacman -Rs --noconfirm manjaro-application-utility
pacman -Rdd manjaro-release bashrc-manjaro manjaro-keyring python-manjaro-sdk
pacman -U https://www.archlinux.org/packages/core/x86_64/{lsb-release,pacman{,-mirrorlist}}/download/
mv /etc/pacman.d/mirrorlist.pacnew /etc/pacman.d/mirrorlist

Arch Install for Macbook Pro

Macbook Pro Retina 15-inch, Late 2013
Model Identifier: MacBookPro11,2

The MacBook Pro 11,x consists of models with Retina display shipped by Apple In Late 2013 and Mid 2014.
Following ArchWiki guide.

Steps for OS installation

Grab a cup of coffe and get ready, because life is not always easy 🙈

Assets

@ViktorQvarfordt
ViktorQvarfordt / trello-mathjax.user.js
Last active January 22, 2019 18:18
Apply Mathjax to Trello
// ==UserScript==
// @name MathJax Trello
// @description Apply Mathjax to Trello
// @include https://trello.com/*
// @grant none
// ==/UserScript==
// INSTALL: https://gist.githubusercontent.com/ViktorQvarfordt/c3f89c3cf50e3dc60b23257294af5710/raw/trello-mathjax.user.js
if (window.MathJax === undefined) {
@lambdamusic
lambdamusic / define.py
Last active February 15, 2023 14:52
Access osx dictionary in python
#!/usr/bin/env python
"""
# Version
2021-08-31
# Tested on
Python 3.9
@gwerbin
gwerbin / uninstall-ghostscript.sh
Last active August 18, 2023 07:52
Uninstall Ghostscript that comes with MacTex.
#!/usr/bin/env bash
# Copyright (c) 2015, 2020, and 2021 by Greg Werbin.
#
# Permission to use, copy, modify, and/or distribute this software for any purpose with
# or without fee is hereby granted, provided that the above copyright notice and this
# permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED “AS IS” AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
# SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@juanpabloaj
juanpabloaj / AdjustWindowHeight.vim
Last active September 21, 2020 22:24
Automatically fitting a quickfix window height, consider a long line as many lines. based in http://vim.wikia.com/wiki/Automatically_fitting_a_quickfix_window_height
au FileType qf call AdjustWindowHeight(3, 10)
function! AdjustWindowHeight(minheight, maxheight)
let l = 1
let n_lines = 0
let w_width = winwidth(0)
while l <= line('$')
" number to float for division
let l_len = strlen(getline(l)) + 0.0
let line_width = l_len/w_width
let n_lines += float2nr(ceil(line_width))