Skip to content

Instantly share code, notes, and snippets.

@lephuongbg
lephuongbg / bitbucket-highlight.user.js
Last active July 17, 2024 09:25
Bitbucket Highlighter User Script
// ==UserScript==
// @name Bitbucket Highlighter
// @namespace https://github.com/lephuongbg
// @version 0.11
// @description Stop-gap solution for highlighting bitbucket pull request
// @author You
// @match https://bitbucket.org/*
// @grant GM_addStyle
// @grant GM_getResourceText
// @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/highlight.min.js
@janbaykara
janbaykara / Piranhas.js
Last active October 8, 2018 10:39
Organise batch operations on an array by Web Workers, in conjunction with workerize-loader (or any other promise-ified Web Worker implementation!)
/**
* Handles multithread processing on an array through promise-ified Web Workers
* (through workerize-loader https://github.com/developit/workerize-loader)
*
* @example
* const piranhas = new Piranhas(
* Worker,
* // Listens for messages from workers
* e => { e.data.type === 'INCREMENT' && someIncrementer() }
* )
@jordi-t
jordi-t / disable-dgpu-xps9560-ubuntu-1610
Last active October 8, 2022 13:57
Disabling dGPU on Dell XPS 9560 on Ubuntu 16.10
# Tested with kernel: 4.9.20-040920-generic
#
# Make sure to install following packages
#
sudo apt install acpi acpi-call-dkms
#
# To manually disable, you can run the following command
#
@whizzzkid
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active December 3, 2022 15:43
[XPS 15 Early 2017 9560 kabylake] Making Nvidia Drivers + (CUDA 8 / CUDA 9 / CUDA 9.1) + Bumblebee work together on linux ( Ubuntu / KDE Neon / Linux Mint / debian )
# Instructions for 4.14 and cuda 9.1
# If upgrading from 4.13 and cuda 9.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-9.0/
# Important libs required with 4.14.x with Cuda 9.X
$ sudo apt install libelf1 libelf-dev
@vasanthk
vasanthk / System Design.md
Last active September 23, 2024 06:28
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@barryvdh
barryvdh / _ide_helper.php
Last active August 5, 2024 20:45
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");