Skip to content

Instantly share code, notes, and snippets.

View CGenie's full-sized avatar
💭
I prefer sourcehut! sr.ht

CGenie

💭
I prefer sourcehut! sr.ht
View GitHub Profile
@CGenie
CGenie / lsp-purescript.el
Created January 20, 2020 10:34
lsp purescript
(use-package! lsp-mode
:config
(progn
(defgroup lsp-purescript nil
"LSP support for PureScript, using purescript-language-server."
:group 'lsp-mode
:link '(url-link "https://github.com/nwolverson/purescript-language-server"))
(define-obsolete-variable-alias
'lsp-purescript-purescript-lang-server-command
File "src/x.ml", line 43, characters 36-39:
Error: This expression has type int32 list -> key
but an expression was expected of type int32
@CGenie
CGenie / .offlineimaprc
Created January 30, 2019 17:15
offlineimaprc
[general]
accounts = gg
maxsyncaccounts = 3
[Account gg]
localrepository = gg-Local
remoterepository = gg-Remote
synclabels = yes
#autorefresh = 1
@CGenie
CGenie / post-files.py
Last active January 2, 2019 21:41
libretime -- script to post files from a given directory
#!/usr/bin/env python
# Invocation: ./post-files.py <some-directory-with-mp3-files>
import os
import requests
from requests.auth import HTTPBasicAuth
import sys
@CGenie
CGenie / Dockerfile
Created September 13, 2017 03:26
Libretime docker setup
FROM ubuntu-upstart:14.04
WORKDIR /code
COPY ./ /code
RUN set -x; \
apt-get update && \
apt-get install -y \
vim

Keybase proof

I hereby claim:

  • I am cgenie on github.
  • I am cgenie (https://keybase.io/cgenie) on keybase.
  • I have a public key ASAQ_k-4ZhrXtVGO7xlvtWKr_yFH4pKxLHNiiWgazhjLCQo

To claim this, I am signing this object:

@CGenie
CGenie / README.md
Last active April 21, 2021 15:04 — forked from obscurerichard/README.md
Simulates a low bandwidth, high-latency network connection

slow

This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.

slow 3G                   # Slow network on default eth0 down to 3G wireless speeds
slow reset                # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet  with a high latency
slow dsl -b 1mbps         # Simulate DSL with a slower speed than the default

slow modem-56k -d eth0 # Simulate a 56k modem on the eth1 device. eth0 is unchanged.

@CGenie
CGenie / rankntype.hs
Created February 11, 2015 19:20
RankNType question
{-# LANGUAGE RankNTypes #-}
module Main
where
class Zeroable a where
zero :: a -> Int
ceph-osd:
name: "Storage - Ceph OSD"
description: "Ceph storage can be configured to provide storage for block volumes (Cinder), images (Glance) and ephemeral instance storage (Nova). It can also provide object storage through the S3 and Swift API ( See settings to enable each)."
restrictions:
- condition: "settings:common.libvirt_type.value == 'vcenter'"
message: "Ceph cannot be used with vCenter"
update_once:
- controller
on_delete: warn
@CGenie
CGenie / field_mapping
Created October 20, 2014 07:36
ES lowercase analyzer
"doc_type_structure": {
"properties": {
"aid": {"type": "string", "index": "analyzed", "analyzer": "not_analyzed_lowercase"}
}
}