Skip to content

Instantly share code, notes, and snippets.

@xcash
xcash / docker-compose.yml
Created Jan 13, 2021
Docker compose yaml for Docker Powered terminal
View docker-compose.yml
version: '2'
services:
console:
build: .
environment:
- HISTFILE=/root/.bash_history/.bash_history
volumes:
- ./consoledata:/console
- ./root/.bash_history:/root/.bash_history
- ./root/.aws:/root/.aws
@xcash
xcash / Dockerfile
Last active Jan 13, 2021
Dockerfile for Docker Powered Terminal
View Dockerfile
# vim:set ft=dockerfile:
FROM ubuntu:latest
RUN apt update && \
apt install -y unzip curl vim-tiny bash-completion groff-base
WORKDIR /tmp
# AWS CLI
@xcash
xcash / extract_translation_labels.py
Created Oct 23, 2019
Small tool to extract labels and merge json files for robisim74/angular-l10n
View extract_translation_labels.py
import re
import json
import glob
import os
import pathlib
# translation.translate('ABC')
PATTERN_TS_1 = re.compile(r"""translation.translate\(['"]([^'"]+)['"]\)""")
# {{ 'ABC' | translate:lang }}
View index.js
/*
* Camera Android Fix
*
* Shows a workaround for bug https://jira.appcelerator.org/browse/TIMOB-12848
* Android: Using the camera on certain devices causes the app to crash
*
*
*/
// Function to manage the taken picture