Skip to content

Instantly share code, notes, and snippets.

Alex Schmoe aschmoe

Block or report user

Report or block aschmoe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aschmoe
aschmoe / DraggableWrappers.js
Last active Jun 27, 2017
Integrating react-select with react-sortable-hoc (ripped out mobx code, so possible its not entirely functional)
View DraggableWrappers.js
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 Aug 24, 2016
Trying to fix steam
View recover.sh
#!/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
Ubuntu + UbuntuGnome Node, PHP, docker based development computer
View alex-dev-install.sh
#!/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
View Asus Zenbook UX303UA
# 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 Aug 29, 2015
Openvpn only works the first time...
View 1instructions.sh
# Create up script
sudo vi /etc/openvpn/up.sh
# Create down script
sudo vi /etc/openvpn/down.sh
View docker-compose.yml
lamp:
image: useltmann/vufind2
ports:
- "81:80"
- "8081:8080"
- "3307:3306"
volumes:
- /home/{USER}/workspace/vufind-clean:/app
@aschmoe
aschmoe / registry-rebuild
Created Apr 28, 2015
Registry rebuild on platform.sh
View registry-rebuild
ssh {ID}@ssh.us.platform.sh << EOF
cd ~/tmp
php registry_rebuild/registry_rebuild.php
bash -l
EOF
@aschmoe
aschmoe / remove-makefile
Last active Aug 29, 2015
Drupal helper script: If you are using some of a profile's modules in your own install profile, but don't want their makefiles to override your versioning, this will just create patches for those modules to delete them
View remove-makefile
#!/bin/sh
echo "List your modules with seperated by spaces (ex: panopoly_core panopoly_widgets)"
read -a modules
echo "Current branch for the set of modules you'd like (ex: 7.x-1.x)"
read branch
echo "The tag for the latest drupal project version (ex: 7.x-1.19)"
read tag
echo "Drupal issue number you'll be posting to (ex: 2453509)"
read issue
@aschmoe
aschmoe / gist:0b7c841d991b2eef4b4e
Created Feb 5, 2015
Installing Docker + Fig properly
View gist:0b7c841d991b2eef4b4e
##############
# Install Docker
# Complex (USE SIMPLE):
# sudo sh -c "echo deb https://get.docker.com/ubuntu docker main\
# > /etc/apt/sources.list.d/docker.list"
# sudo apt-get update
# sudo apt-get install lxc-docker
# SIMPLE:
@aschmoe
aschmoe / vbo-update
Created Jan 28, 2015
Drupal: Views bulk operation to move a file without affecting node update date
View vbo-update
<?php
// Dont include the php tag in the VBO interface
if(!empty($entity->field_picture) && empty($entity->field_pictures_multiple)) {
$entity->field_pictures_multiple['und'] = array($entity->field_picture['und'][0]);
field_attach_update('node', $entity);
}
You can’t perform that action at this time.