Skip to content

Instantly share code, notes, and snippets.

@timsueberkrueb
timsueberkrueb / yoga910-fix-screen-flickering.md
Last active February 8, 2023 19:44
Fix Screen Flickering on Ubuntu on Lenovo Yoga 910

Fix Screen Flickering on Ubuntu on Lenovo Yoga 910

  • Edit /etc/default/grub

    • Add i915.enable_rc6=0 GRUB_CMDLINE_LINUX_DEFAULT
    • Run sudo update-grub
    • Reboot (optional)
  • Create and edit ~/.drirc:

@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@alonecuzzo
alonecuzzo / ithunk.swift
Created February 2, 2016 20:14
Thunk Presentation
import UIKit
//POP is great, but there are some gotchas when dealing with protocols that have a Self requirement.
// Self
protocol OwlType {
func hootWithOwlType(owl: Self)
}
class GreatHornedOwl: OwlType {
@OlavHN
OlavHN / gist:ff73b104bb25e5e08a51
Last active June 28, 2017 19:27
React render to polymer components!
<!doctype html>
<html>
<head>
<!-- Web Component Polyfill for old browsers -->
<script src="https://www.polymer-project.org/platform.js"></script>
<!-- Release candidate of next React -->
<script src="http://fb.me/react-with-addons-0.12.0-rc1.js"></script>
<script src="http://fb.me/JSXTransformer-0.12.0-rc1.js"></script>
<!-- Import a web component -->
@mrietveld
mrietveld / LaptopSetup.md
Last active October 7, 2021 14:13
What I Currently Use

What I currently use

Updated: 2021-10-06

OS

@marioBonales
marioBonales / .bashrc
Created January 19, 2012 03:56
Default .bashrc for ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@mattetti
mattetti / rack_example.ru
Created December 8, 2011 13:58
Very basic rack application showing how to use a router based on the uri and how to process requests based on the HTTP method used.
#########################################
# Very basic rack application showing how to use a router based on the uri
# and how to process requests based on the HTTP method used.
#
# Usage:
# $ rackup rack_example.ru
#
# $ curl -X POST -d 'title=retire&body=I should retire in a nice island' localhost:9292/ideas
# $ curl -X POST -d 'title=ask Satish for a gift&body=Find a way to get Satish to send me a gift' localhost:9292/ideas
# $ curl localhost:9292/ideas
@victoroliv2
victoroliv2 / cross-site-xmlhttprequest.py
Created October 7, 2011 19:09
web.py server which allow cross-site xmlhttprequest
import web
urls = (
'/(.*)', 'Service'
)
app = web.application(urls, globals())
class Service:
def GET(self, name):
web.header('Access-Control-Allow-Origin', '*')