Skip to content

Instantly share code, notes, and snippets.

Current status : working, but no fingerprint reader and no Fn key before first suspend.

Initial hardware setup

How I got it working

@bangedorrunt
bangedorrunt / article-style.css
Last active July 17, 2023 13:40
GoldenDict Dark Theme
body
{
margin-top: 1px;
margin-right: 3px;
margin-left: 2px;
margin-bottom: 3px;
background: #201F1F;
color: white;
font-family: Bookerly, Segoe UI, Palatino Linotype, Arial Unicode MS;
}
@ZhiguoLong
ZhiguoLong / i3exit.sh
Created February 14, 2016 06:55
i3 helper shell command for exiting
#!/bin/sh
lock() {
exec sh ~/.i3/i3lock.sh
}
case "$1" in
lock)
lock
;;
logout)
@franga2000
franga2000 / Ubuntu on Acer Aspire Switch 10.md
Last active January 31, 2024 21:40
Ubuntu on Acer Aspire Switch 10

Ubuntu on Acer Aspire Switch

The problem

What's the problem with this tablet? Why can't I just insert the USB and mash F12 until it boots? The tablet is made to run Windows 8.1 and Windows 8.1 only. Some absolute genius at Acer decided to put a 32-bit UEFI on a 64-bit system, which no reasonable Linux distro supports out-of-the-box.

NOTE: This guide focuses on installing Ubuntu alongside Windows. If you're trying to replace Windows, then I assume you know enough about Linux to know which parts to change.

What works:

  • Keyboard
@damianmcdonald
damianmcdonald / JerseyRestClientMultipartUpload.java
Created July 19, 2015 11:16
Multi Part Upload using Jersey REST client
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.config.ClientConfig;
import com.sun.jersey.api.client.config.DefaultClientConfig;
import com.sun.jersey.core.header.FormDataContentDisposition;
import com.sun.jersey.multipart.FormDataMultiPart;
import com.sun.jersey.multipart.MultiPart;
import com.sun.jersey.multipart.file.FileDataBodyPart;
import org.json.JSONObject;
@kaito834
kaito834 / curl_multipart-mixed_sample.bat
Created June 27, 2015 06:10
send a HTTP request which Content-Type is 'multipart/mixed' by cURL
@echo off
REM http://curl.haxx.se/docs/manpage.html#-F
REM http://curl.haxx.se/mail/archive-2010-03/0049.html
REM cURL installed with msysgit is used on this batch.
REM Output of "curl -V" is below
REM curl 7.41.0 (i386-pc-win32) libcurl/7.41.0 OpenSSL/0.9.8zf zlib/1.2.8
REM Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
REM Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz
set curlPath="C:\Program Files (x86)\Git\bin\curl.exe"
@thenewvu
thenewvu / chroot_from_iso.txt
Last active November 19, 2023 13:57
A guide to create a chroot environment from an Ubuntu iso on Ubuntu
# download ubuntu iso
The iso version should be lower/equal than/to the host version.
# install uck (ubuntu customization kit)
run:
sudo apt-get install uck
# setup chroot environment from iso
@dalegaspi
dalegaspi / python27_on_centos65.md
Last active September 9, 2021 05:29
Installing Python 2.7 on CentOS 6.5

Installing Python 2.7 on Centos 6.5

Centos 6.* comes with Python 2.6, but we can't just replace it with v2.7 because it's used by the OS internally (apparently) so you will need to install v2.7 (or 3.x, for that matter) along with it. Fortunately, CentOS made this quite painless with their Software Collections Repository

sudo yum update # update yum
sudo yum install centos-release-scl # install SCL 
sudo yum install python27 # install Python 2.7

To use it, you essentially spawn another shell (or script) while enabling the newer version of Python:

@mbn18
mbn18 / gist:0d6ff5cb217c36419661
Last active October 21, 2023 10:22
How to install nsenter on Ubuntu 14.04
# Ubuntu 14.04 don't have nsenter - the straight forward way required me to install build tools and etc.
# I preferred to keep the system clean and install nsenter in a container and then copy the command to the host
# Note - its also possible to run nsenter from a container (didn't tried) https://github.com/jpetazzo/nsenter
# start a container
docker run --name nsenter -it ubuntu:14.04 bash
## in the docker
apt-get update
apt-get install git build-essential libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool
@amontalenti
amontalenti / Storm-Topology-Freeze-Issues.md
Last active December 8, 2017 07:17
Storm 0.9.2 exceptions related to multiple workers/supervisors

Conditions

Two Storm supervisors running in a 3-node configuration: one "head" node (nimbus) and two worker nodes. Each supervisor node runs a supervisor under supervision.

Topology

Multi-lang topology using Python and our streamparse library. Works fine when running on a single machine. Spout reads off Kafka and inserts tuples into