Skip to content

Instantly share code, notes, and snippets.

View ratheesh's full-sized avatar

Ratheesh ratheesh

  • Bangalore, KA, IN
  • 08:17 (UTC +05:30)
View GitHub Profile
@larsch
larsch / install-arch-linux-rpi-zero-w.sh
Created July 6, 2017 06:05
Install Arch Linux ARM for Raspberry Pi Zero W on SD Card (with commands to configure WiFi before first boot).
#!/bin/sh -exu
dev=$1
cd $(mktemp -d)
function umountboot {
umount boot || true
umount root || true
}
# RPi1/Zero (armv6h):
@JayKickliter
JayKickliter / build_arm_gdb.sh
Last active April 28, 2025 07:02
Building `arm-none-eabi-gdb` with python support
#!/usr/bin/env sh
export TARGET=arm-none-eabi
export PREFIX=$HOME/.local
export PATH=$PATH:$PREFIX/bin
export VERSION=7.8.1
export GDB=gdb-$VERSION
rm -rf $GDB
@HerringtonDarkholme
HerringtonDarkholme / ctrlp.vim
Last active July 6, 2019 17:48
give syntax highlight for ctrlp vim-devicon
"I borrowed this crazy code from vim-tomorrow-theme colorschemes
" Returns an approximate grey index for the given grey level
fun! s:grey_number(x)
if &t_Co == 88
if a:x < 23
return 0
elseif a:x < 69
return 1
elseif a:x < 103
@ruario
ruario / intro-latest-widevine.md
Last active November 14, 2025 15:42
Fetches the latest Linux Widevine binary so that it can be used by Vivaldi.

With the release of Vivaldi 2.2, this page is now obsolete and unmaintained. Widevine is fetched automatically on post install of our official packages. The information below and the script are left for historical reasons but will not be updated.

If you are using something newer than Vivaldi 2.2, you should not be using this script as there is simply no need. Any need you think you have for it would be a bug IMHO and thus should be logged in a bug report. Before you do so however, you should also checkout the Vivaldi help page on Widevine, on Linux


Summary

A bunch of people asked how they could use this script with pure Chromium on Ubuntu. The following is a quick guide. Though I still suggest you at least try Vivaldi. Who knows, you might like it. Worried about proprietary componants? Remember that libwidevinecdm.so is a b

@ctechols
ctechols / compinit.zsh
Last active April 16, 2026 22:00
Speed up zsh compinit by only checking cache once a day.
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
@dsager
dsager / create_repo.sh
Last active April 25, 2017 13:31
Shell Script to Merge Multiple Git Repositories via Subtree Merge
#! /bin/sh
# based on https://help.github.com/articles/working-with-subtree-merge
# Copyright (c) 2014 Daniel Sager
# License: MIT, https://gist.github.com/dsager/0edcbf806b5b86e78455#file-2014
REPOS="front-end back-end"
BRANCHES="develop master"
DIR="monolith"
@reagent
reagent / .gitignore
Last active November 8, 2023 08:53
Curses Windowing Example
demo
*.swp
@shivam5992
shivam5992 / rest_app.py
Created January 16, 2014 08:45
REST ful web API using Flask A simple To-Do list implementation
'''
REST Ful WEB API in Flask
Simple Rest api in which resource is list of tasks
methods are implemented for GET, POST, PUT, DELETE
author: Shivam Bansal
website: shivambansal.com
Reference: http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
'''
@rainerborene
rainerborene / ctrlp.vim
Last active November 22, 2017 13:52
Close buffer via <C-@> using CtrlP
let g:ctrlp_buffer_func = { 'enter': 'CtrlPMappings' }
function! CtrlPMappings()
nnoremap <buffer> <silent> <C-@> :call <sid>DeleteBuffer()<cr>
endfunction
function! s:DeleteBuffer()
let path = fnamemodify(getline('.')[2:], ':p')
let bufn = matchstr(path, '\v\d+\ze\*No Name')
exec "bd" bufn ==# "" ? path : bufn
@Gnurou
Gnurou / Kexec for ARM
Created October 28, 2013 03:34
Cross-compiling Kexec for ARM, how-to.
./bootstrap
LDFLAGS=-static ./configure --host=arm-none-linux-gnueabi --without-zlib --without-lzma
make
-> static binary in build/sbin/kexec