Skip to content

Instantly share code, notes, and snippets.

View fearphage's full-sized avatar
⌨️
Cache rules everything around me.

Phred Lane fearphage

⌨️
Cache rules everything around me.
View GitHub Profile
@marchelbling
marchelbling / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active June 6, 2017 05:12 — forked from whizzzkid/XPS-15 9560 Getting Nvidia To Work on KDE Neon
Making Nvidia Drivers + CUDA 8 + Bumblebee work together on XPS 15 Early 2017 9560 kabylake.
1. disable secure boot
2. clean install windows (see https://www.reddit.com/r/Dell/comments/5qe3oh/how_to_fresh_install_on_xps_15_9560/)
2.1 in case usb does not show on boot: http://www.dell.com/support/article/us/en/19/SLN297060/xps-13-9343--how-to-install-ubuntu-developer-edition-1404-on-a-dell-pc-configured-for-the-unified-extensible-firmware-interface--uefi--bios?lang=EN
# Update kernel (is this mandatory?)
( mkdir /tmp/kernel-4.10.6
cd /tmp/kernel-4.10.6
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.6/linux-headers-4.10.6-041006_4.10.6-041006.201703260832_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.6/linux-headers-4.10.6-041006-generic_4.10.6-041006.201703260832_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.6/linux-image-4.10.6-041006-generic_4.10.6-041006.201703260832_amd64.deb
@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
@LindaLawton
LindaLawton / GoogleAuthenticationCurl.sh
Last active June 9, 2024 10:41
Curl bash script for getting a Google Oauth2 Access token
# Tutorial https://www.daimto.com/how-to-get-a-google-access-token-with-curl/
# YouTube video https://youtu.be/hBC_tVJIx5w
# Client id from Google Developer console
# Client Secret from Google Developer console
# Scope this is a space seprated list of the scopes of access you are requesting.
# Authorization link. Place this in a browser and copy the code that is returned after you accept the scopes.
https://accounts.google.com/o/oauth2/auth?client_id=[Application Client Id]&redirect_uri=http://127.0.0.1&scope=[Scopes]&response_type=code
# Exchange Authorization code for an access token and a refresh token.
@marcan
marcan / linux.sh
Last active December 1, 2023 15:18
Linux kernel initialization, translated to bash
#!/boot/bzImage
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name
@manasthakur
manasthakur / grepping.md
Last active September 24, 2022 13:30
Vim: Creating your own ack.vim/ag.vim

Creating your own ag.vim

Vim provides built-in mechanisms to search through projects in the form of the grep command. However, on large projects, grep is known to be slow; and hence people have been switching to simpler searchers like ack, and faster, parallel (metal?) searchers like ag and pt. Correspondingly, several plugins have been created that integrate these tools in vim: ack.vim, ag.vim, etc.

However, it's actually very easy to get the functionalities these plugins provide (faster search, results in quickfix-window, jumps, previews, and so on) in vanilla Vim itself; in fact, Vim already populates the grep-search results in a quickfix window. We just need to tell Vim to do the following things (use-case: ag):

  • Use ag as the default grep program
  • Open quickfix window by default
  • Create mappin
@mweststrate
mweststrate / mobx-webcomponent.html
Last active January 22, 2024 08:25
MobX + webcomponents
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/mobx@2.6.0/lib/mobx.umd.js"></script>
<script>
var MobxDemo = Object.create(HTMLElement.prototype);
MobxDemo.attachedCallback = function() {
var state = mobx.observable({
counter : parseInt(this.getAttribute("counter"))
})
@robrez
robrez / polymerVsAngular.md
Last active March 20, 2017 10:33
Polymer Vs Angular

Polymer vs Angular?

These are not competing technologies. Angular is a framework. Polymer is a library. Let’s skip comparing libraries / frameworks against other libraries / frameworks for a second (polymer or angular or react or meteor or backbone or mustache or express or jquery or dojo or kendo).

Web development is ever-evolving. Being in tune with state of the platform (HTML, HTTP, Javascript, CSS) is critical to helping teams choose what technology (or technologies) are the right fit for particular team/project, to be responsive to paradigm shifts and to stay ahead of the curve (or at least not behind it).

There are a handful game-changing platform changes that have occurred recently. For the purposes of this conversation, let’s touch on just a couple.

@ruario
ruario / appimage-vivaldi.sh
Last active March 29, 2023 14:08
A script to convert a Vivaldi rpm or deb into Appimage format.
#!/bin/sh
#
# appimage-vivaldi.sh (version 0.2)
#
# A script to convert a Vivaldi rpm or deb into Appimage format.
# Before you use this script, you may need to adjust the following
# variable, based on the name and location of AppImageAssistant on
# your system.
@njbartlett
njbartlett / reaper.pony
Last active February 24, 2018 17:30
Docker Container Reaper in Ponylang (a learning exercise)
use "collections"
use "json"
use "net"
use "net/http"
use "time"
actor Main
"""
This is my learning exercise for the Pony language (ponylang.org). It is a
port of a Java application that:
@ndarville
ndarville / README.md
Last active September 21, 2023 21:34
How to export and rehost your Tumblr site

How to export and rehost your Tumblr site

(Update: Version 3.2.0 of Jekyll looks like it's breaking a few things, so I've changed the guide to make you specifically install the version I was using, 3.1.3. I believe this is the issue: jekyll/jekyll#5145.)

You will be using jekyll-import to export your Tumblr site, Jekyll to (re)create it, and Surge to rehost it.

Update: You can also use Tumblr's native export feature in your blogs' individual settings. But rehosting that might be tricky. Read my comments below this post for how that works.

Setup and installation