Skip to content

Instantly share code, notes, and snippets.

@aschmoe
aschmoe / convertTypesToProps.mjs
Created August 25, 2023 22:42
Script example for typescript-to-proptypes
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import glob from 'glob';
import prettier from 'prettier';
import rimraf from 'rimraf';
import * as ttp from 'typescript-to-proptypes';
/**
* Creates needed directories for a file path
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/alex/.oh-my-zsh
# docker, etc autocomplete
fpath=(~/.zsh/completion $fpath)
autoload -Uz compinit && compinit -i
#!/usr/bin/sudo ruby
#
# revealer.rb -- Deobfuscate GHE .rb files.
#
# This is simple:
# Every obfuscated file in the GHE VM contains the following code:
#
# > require "ruby_concealer.so"
# > __ruby_concealer__ "..."
@aschmoe
aschmoe / DraggableWrappers.js
Last active June 27, 2017 03:16
Integrating react-select with react-sortable-hoc (ripped out mobx code, so possible its not entirely functional)
import React, { Component } from 'react';
import { PropTypes as PT } from 'prop-types';
import {
SortableHandle,
SortableElement,
SortableContainer
} from 'react-sortable-hoc';
/**
* Draggable handle wraps the label
@aschmoe
aschmoe / recover.sh
Created August 24, 2016 06:11
Trying to fix steam
#!/bin/bash
# 10s is the time window where systemd stops trying to restart a service
# Xsleep 15
# if lightdm is not running after 15s, it's not a random crash, but many
# otherwise nothing to do, systemd will call us again if it crashes more
# if pidof -x lightdm > /dev/null
# then
# exit 0
@aschmoe
aschmoe / alex-dev-install.sh
Created May 23, 2016 21:55
Ubuntu + UbuntuGnome Node, PHP, docker based development computer
#!/bin/bash
# git
sudo apt-get install -y git
#curl
sudo apt-get install -y curl
# pip
wget https://bootstrap.pypa.io/get-pip.py
# Ubuntu Gnome
## Arc Theme
sudo rm -rf /usr/share/themes/{Arc,Arc-Darker,Arc-Dark}
rm -rf ~/.local/share/themes/{Arc,Arc-Darker,Arc-Dark}
rm -rf ~/.themes/{Arc,Arc-Darker,Arc-Dark}
cd ~/.themes
git clone https://github.com/horst3180/arc-theme --depth 1 && cd arc-theme
./autogen.sh --prefix=/usr --with-gnome=3.16
@aschmoe
aschmoe / 1instructions.sh
Last active August 29, 2015 14:21
Openvpn only works the first time...
# Create up script
sudo vi /etc/openvpn/up.sh
# Create down script
sudo vi /etc/openvpn/down.sh
@aschmoe
aschmoe / docker-compose.yml
Last active August 29, 2015 14:21
Docker vufind 2
lamp:
image: useltmann/vufind2
ports:
- "81:80"
- "8081:8080"
- "3307:3306"
volumes:
- /home/{USER}/workspace/vufind-clean:/app
@aschmoe
aschmoe / registry-rebuild
Created April 28, 2015 17:37
Registry rebuild on platform.sh
ssh {ID}@ssh.us.platform.sh << EOF
cd ~/tmp
php registry_rebuild/registry_rebuild.php
bash -l
EOF