Skip to content

Instantly share code, notes, and snippets.

@remi6397
remi6397 / compact.user.js
Last active April 27, 2023 08:18
Bring Back Reddit Compact!
// ==UserScript==
// @name Bring back Reddit Compact
// @match https://*.reddit.com/*
// @grant none
// @version 1.11
// @license Unlicense; https://unlicense.org/
// ==/UserScript==
(function() {
'use strict';
@remi6397
remi6397 / light_or_dark.py
Created April 17, 2023 05:34
Is it light, or is it dark outside? / Set theme based on sunrise/sunset times.
"""
Outputs "dark" when it's dark and "light" when it's light.
Only works on Freedesktop platforms (Linux, *BSD, etc.).
NOTE: This code was stolen from the depths of hell. I give absolutely no warranty for this. I also hate this.
"""
import math
import datetime
import time
@remi6397
remi6397 / pcigrep.sh
Last active August 14, 2022 10:56
grep in `lspci -v`
#!/bin/bash
ROPT=
while [ -n "$1" ]; do
case "$1" in
-i)
ROPT=I
shift
;;
--)
shift
@remi6397
remi6397 / README.md
Last active January 2, 2022 12:18
remi6397 — about me
@remi6397
remi6397 / 00_README_SONY_ATRAC3_WINETRICKS.md
Last active May 16, 2021 12:48
SONY ATRAC3 Codec Installer for Winetricks

SONY ATRAC3 Codec Installer for Winetricks

Usage

$ git clone https://gist.github.com/remi6397/6463a82d0ddae43abf6d20f4c9de4dae atrac3-winetricks
$ cd atrac3-winetricks
$ winetricks atrac3.verb
@remi6397
remi6397 / .vimrc
Created October 19, 2020 09:38
remi's .vimrc (2)
" vim: fdm=marker :
" This source code form is part of ``remi's dotfiles''
"
" Any copyright is dedicated to the Public Domain.
" https://creativecommons.org/publicdomain/zero/1.0/
"
" Authored by: Jeremiasz Nelz <remi6397 {at} gmail.com>
call plug#begin() " {{{
$ # An example REPL session
$ python3 interpret.py
Python [REDACTED] (default, [REDACTED])
[REDACTED] on [REDACTED]
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> 10
10
>>> repr_map['int'] = bin
>>> 10
@remi6397
remi6397 / .vimrc
Created April 20, 2019 21:41
vimrc
call plug#begin()
" VIM
Plug 'scrooloose/nerdtree'
" Themes
Plug 'rakr/vim-two-firewatch'
"Plug 'kaicataldo/material.vim'
" VCS support
@remi6397
remi6397 / json_to_xml.ex
Created March 21, 2018 12:04
Several parts of XML <-> JSON converter (taken from my Phoenix webapp)
defmodule PastebinderWeb.JSONToXmlHelper do
def to_xml(map) do
list = to_list(map)
:xmerl.export_simple(list, :xmerl_xml)
|> List.flatten
|> to_string
end
defp to_list(map) when is_map(map) do
keyword = Map.to_list(map)
0.0.0.0 ars.smartscreen.microsoft.com
0.0.0.0 az361816.vo.msecnd.net
0.0.0.0 az512334.vo.msecnd.net
0.0.0.0 blob.weather.microsoft.com
0.0.0.0 candycrushsoda.king.com
0.0.0.0 cdn.content.prod.cms.msn.com
0.0.0.0 cdn.onenote.net
0.0.0.0 choice.microsoft.com
0.0.0.0 choice.microsoft.com.nsatc.net
0.0.0.0 client.wns.windows.com