Skip to content

Instantly share code, notes, and snippets.

@reneklacan
reneklacan / Crawl.hs
Last active August 29, 2015 14:21
Crawl a page and print a JSON with site info
{-# LANGUAGE OverloadedStrings #-}
import Data.Tree.NTree.TypeDefs
import Text.XML.HXT.Core
import Data.Text hiding (length,foldl)
import qualified Data.HashMap.Strict as M
import Data.Aeson
import Text.HandsomeSoup
data SiteInfo = SiteInfo

Keybase proof

I hereby claim:

  • I am reneklacan on github.
  • I am reneklacan (https://keybase.io/reneklacan) on keybase.
  • I have a public key ASAXc04YP053izFqDNKm-SAh1MR2I4psnmeauqiPbGmRcgo

To claim this, I am signing this object:

֭ => ֖
֮ => ֘
֨ => ֙
֤ => ֚
᪴ => ۛ
⃛ => ۛ
ؙ => ̓
ࣳ => ̓
̓ => ̓
̕ => ̓
# typed: ignore
require "typhoeus"
require "typhoeus/adapters/faraday"
require "elasticsearch"
require "chewy"
require "lib/chewy/bad_request"
# Compatibility workaroun for ElasticSearch 7.8
# One of issues related to Chewy 7.x compatibility: https://github.com/toptal/chewy/issues/673
module Chewy
@reneklacan
reneklacan / viscosity-to-openvpn.py
Created December 16, 2021 16:32
script to convert visz to ovpn - python3 viscosity-to-openvpn.py file.visz
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Converts viscosity export files into an open vpn package
Usage: viscosity-to-openvpn.py <input> <output>
"""
import io
import os
import sys
import tarfile
@reneklacan
reneklacan / aoe4-mp-fix.sh
Last active October 28, 2024 02:03
Script to fix AOE4 desync issues
#!/bin/bash
set -ex
STEAM_DIR=/home/$USER/.steam/steam/steamapps
AOE4_DIR=$STEAM_DIR/compatdata/1466860
AOE4_WIN_DIR=$AOE4_DIR/pfx/drive_c/windows
AOE4_WIN_SYS32_DIR=$AOE4_WIN_DIR/system32
AOE4_WIN_SYS64_DIR=$AOE4_WIN_DIR/syswow64