Skip to content

Instantly share code, notes, and snippets.

@xcash
xcash / extract_translation_labels.py
Created October 23, 2019 15:51
Small tool to extract labels and merge json files for robisim74/angular-l10n
import re
import json
import glob
import os
import pathlib
# translation.translate('ABC')
PATTERN_TS_1 = re.compile(r"""translation.translate\(['"]([^'"]+)['"]\)""")
# {{ 'ABC' | translate:lang }}
@xcash
xcash / docker-compose.yml
Created January 13, 2021 13:44
Docker compose yaml for Docker Powered terminal
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 January 13, 2021 13:24
Dockerfile for Docker Powered Terminal
# 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 / index.js
Last active December 10, 2016 00:58
/*
* 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