Skip to content

Instantly share code, notes, and snippets.

View atcol's full-sized avatar
🎯
Focusing

Alex atcol

🎯
Focusing
View GitHub Profile
@atcol
atcol / python_resources.md
Created June 12, 2014 11:36 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@atcol
atcol / README.md
Last active August 29, 2015 14:18
json4s & Jackson StackOverflow error when serializing case class with Char field

Using the model.scala and build.sbt files defined in this gist, perform the following to reproduce a StackOverflowError when serializing a case class instance that has a Char field.

Now start sbt console:

sbt console

and paste the following:

import org.json4s._

import org.json4s.jackson.JsonMethods._

@atcol
atcol / Grails3-integration-test-deadlock
Created July 3, 2016 08:47
Thread dump for Grails 3 Controller / Integration Tests that succeed but hang forever after finishing.
INFO org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext - Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@127d7908: startup date [Sun Jul 03 09:42:24 BST 2016]; root of context hierarchy
INFO org.springframework.context.support.DefaultLifecycleProcessor - Stopping beans in phase -2147483648
INFO org.grails.plugins.datasource.TomcatJDBCPoolMBeanExporter - Unregistering JMX-exposed beans on shutdown
INFO org.grails.plugins.datasource.TomcatJDBCPoolMBeanExporter - Unregistering JMX-exposed beans
INFO org.hibernate.tool.hbm2ddl.SchemaExport - HHH000227: Running hbm2ddl schema export
INFO org.hibernate.tool.hbm2ddl.SchemaExport - HHH000230: Schema export complete
2016-07-03 09:43:23
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.92-b14 mixed mode):
"localhost-startStop-2" #57 daemon prio=5 os_prio=0 tid=0x0000000025bd7000 nid=0x14c0 waiting for monitor entry [0x00000000313ee000]
@atcol
atcol / Markov.hs
Last active July 31, 2019 07:21
A simple tri-state Markov Chain generator. I think.
#!/usr/bin/env stack
-- stack --resolver lts-13.30 script --package random
import Control.Monad (foldM)
import Data.List (elemIndex, minimumBy)
import Data.Maybe (fromMaybe)
import Debug.Trace (trace)
import System.IO (getLine)
import System.Random (randomIO, randomRIO)
@atcol
atcol / shell.nix
Last active December 30, 2020 09:46
Rust & Yarn `nix.shell` for consistent development environments
with (import <nixpkgs> {});
mkShell {
buildInputs = [
gcc
glibc
zlib
openssl
rustup
ripgrep
exa
@atcol
atcol / shell.nix
Last active January 1, 2021 19:04
Basic Rust nightly development shell using Nix and Mozilla's Rust Overlay
with (import <nixpkgs> {});
mkShell {
buildInputs = [
gcc
glibc
zlib
openssl
rustup
ripgrep
exa
@atcol
atcol / x11vnc-shared-session.md
Created May 9, 2021 12:11
Shared X11VNC XRDP Session (e.g. Windows to Linux)

X11VNC and XRDP Shared Session

On the host:

x11vnc -noxdamage -display :0 -safer  -once