Skip to content

Instantly share code, notes, and snippets.

View sebastien's full-sized avatar

Sébastien Pierre sebastien

View GitHub Profile
@javanna
javanna / acpi_yogaX1_fedora28
Created July 15, 2018 19:02
S3 deep sleep for Lenovo yoga X1 3rd Generation on Fedora 28
This is a step-by-step guide on how make sleep mode work with a Lenovo Yoga X1 3rd generation running Fedora 28 (UEFI based system).
Kernel version: 4.17.4-200.fc28.x86_64
Credits: most of this guide comes from `https://delta-xi.net/#056`. The patch I used is a little different though, taken from http://kernel.dk/acpi.patch
(found through https://bbs.archlinux.org/viewtopic.php?pid=1794150#p1794150), and some of the steps slightly differ as well as mine is a UEFI based system.
1. Reboot, enter BIOS/UEFI. Go to Config - Thunderbolt (TM) 3 - set Thunderbolt BIOS Assist Mode to Enabled. Set also Security - Secure Boot to Disabled.
2. Install iasl (Intel's compiler/decompiler for ACPI machine language) and cpio: `sudo yum install acpica-tools cpio`
@gwpantazes
gwpantazes / How to Install JDK MacOS Homebrew.md
Last active April 18, 2024 21:43
How to install different JDK versions on MacOS with Homebrew

How To Install Different JDK Versions on MacOS with Homebrew

Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version

This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.

Table of Contents

@dkobia
dkobia / gist:490967
Created July 26, 2010 18:18
Ushahidi Clustering - Python
#!/usr/bin/env python
import math
import sys
import MySQLdb
MAP_ZOOM = 21
MAP_OFFSET = 268435456 # half the Earth's circumference at zoom level 21
MAP_RADIUS = MAP_OFFSET / math.pi
def longitude_to_x(longitude):