-
Create a virtualenv
$ virtualenv env
-
Activate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This fixes the issue of swapped buttons and Triggers in the dualsense controller opening the pause menu | |
# The issue is caused by the SDL version used by hollow knight not recognizing the dualsense controller and | |
# mapping buttons properly. It is also not helped by steam input not disabling the native controller support | |
# when used in hollow knight. The issue cannot be fixed by simple mapping in steam input. | |
# Disable Steam Input | |
# Set the following as launch option | |
SDL_GAMECONTROLLERCONFIG="050000004c050000e60c000000810000,Sony DualSense ,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux," %command% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// as one-liner for bookmarklet | |
javascript:;(function(){var images=document.querySelector('#background.player').children;try{for (let img of images) {downloadResource(img.src)}}catch(e){alert("Download failed.");console.log('Download failed.',e)}function forceDownload(blob,filename){var a=document.createElement('a');a.download=filename;a.href=blob;a.click()}function downloadResource(url,filename){if(!filename)filename=url.split('\\').pop().split('/').pop();fetch(url,{headers:new Headers({'Origin':location.origin}),mode:'cors'}).then(response=>response.blob()).then(blob=>{let blobUrl=window.URL.createObjectURL(blob);forceDownload(blobUrl,filename)}).catch(e=>console.error(e))}}).call(window); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# abort on nonzero exitstatus | |
set -o errexit | |
# abort on unbound variable | |
set -o nounset | |
# don't hide errors within pipes | |
set -o pipefail | |
# Print each command for debugging | |
# set -o xtrace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Fix X window manager name properties to work around java bugs with | |
# non-reparenting window managers. This is a different solution from | |
# the wmname utility provided by suckless, as it is NetWM compatible, | |
# while wmname sets the value of _NET_SUPPORTING_WM_CHECK to root win. | |
IRONIC_WM_NAME="LG3D" | |
NET_WIN=$(xprop -root _NET_SUPPORTING_WM_CHECK | awk -F "# " '{print $2}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn pig_latin_word(word: &str) -> String { | |
let mut chars_iter = word.chars(); | |
let mut first_last = if let Some(first) = chars_iter.next() { | |
let mut rest: String = chars_iter.collect(); | |
rest.push(first); | |
rest | |
} else { | |
"".to_owned() | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate websocket; | |
extern crate tokio_core; | |
extern crate futures; | |
use websocket::{Server, Message, Sender, Receiver}; | |
use websocket::message::Type; | |
use websocket::header::WebSocketProtocol; | |
use futures::Future; | |
use futures::stream::Stream; |
I hereby claim:
- I am jonfk on github.
- I am jonfk (https://keybase.io/jonfk) on keybase.
- I have a public key ASA_ts-tV6nov6vpEaScVpWVIoZo-5PE4F2EdZxKoeip5wo
To claim this, I am signing this object:
Table of Contents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq inhibit-startup-screen t) | |
(setq inhibit-splash-screen t) | |
;;(setq-default truncate-lines t) | |
(setq visible-bell t) | |
(require 'cl) | |
(setq scroll-step 1 | |
scroll-conservatively 10000) | |
;; Custom message in the scratch buffer |
NewerOlder