Skip to content

Instantly share code, notes, and snippets.

View macagua's full-sized avatar
🏠
Working from home

Leonardo J. Caballero G. macagua

🏠
Working from home
View GitHub Profile
@fxbenard
fxbenard / .config
Last active November 9, 2016 14:49
The config template file for the Transifex client for WordPress projects
[main]
host = https://www.transifex.com
[project_slug.pot_slug]
file_filter = languages/pot_slug-<lang>.po
source_file = languages/pot_slug.pot
source_lang = en_US
type = PO
@fxbenard
fxbenard / pulls
Last active November 9, 2016 14:50
TX Client command lines
/* Pull source and language from TX */
$tx pull -s -t
/* Pull languages from TX over a percentage */
$tx pull -a --minimum-perc=number
/* Pull a specific language from TX, eg.French */
$tx pull -l fr_FR
@ahankinson
ahankinson / template
Last active October 6, 2019 02:52
Django Login
from django.contrib.auth.views import logout
from django.contrib.auth import login
from django.shortcuts import render, redirect
from django.views.generic.base import View
from django.contrib.auth.forms import AuthenticationForm
class LoginFormView(View):
form_class = AuthenticationForm
template_name = 'login.html'
[buildout]
parts =
instance
zopepy
test
packages
extends =
https://raw.github.com/plone/buildout.coredev/5.0/sources.cfg
https://raw.github.com/plone/buildout.coredev/5.0/checkouts.cfg
@numahell
numahell / cover-to-bootsrap2-rules.xml
Created December 12, 2013 14:33
For plone diazo theme, rules.xml snippet to convert cover grid (16 columns on deco) to bootstrap 2 or 3 grid (12 columns).
<?xml version="1.0" encoding="UTF-8"?>
<rules
xmlns="http://namespaces.plone.org/diazo"
xmlns:css="http://namespaces.plone.org/diazo/css"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- All rules for your theme diazo -->
@eliezerfot123
eliezerfot123 / combox_dependientes.html
Created December 24, 2013 03:19
ComboBox dependientes con ajax y html5.
<html>
<head>
<title>
COMBOBOX
</title>
<script type="text/javascript">
function cargarSelect2(valor) {
var arrayValores=new Array(
new Array(1,1,"opcion1-1"),
@fxbenard
fxbenard / Gruntfile.js
Created January 4, 2014 16:38
Transifex integration into my Gruntfile.js
var shell = require('shelljs');
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
po2mo: {
files: {
src: 'lang/*.po',
@acdha
acdha / pre-commit
Last active April 18, 2024 02:22
Git pre-commit hook which runs various code linters. Install this to .git/hooks/pre-commit inside your favorite repos
#!/usr/bin/env PYTHONIOENCODING=utf-8 python
# encoding: utf-8
"""Git pre-commit hook which lints Python, JavaScript, SASS and CSS"""
from __future__ import absolute_import, print_function, unicode_literals
import os
import subprocess
import sys
@carlosfunk
carlosfunk / install_python.ps1
Last active June 13, 2023 04:57
Powershell scripts for setting up a Python environment under Windows
# To run this file you will need to open Powershell as administrator and first run:
# Set-ExecutionPolicy Unrestricted
# Then source this script by running:
# . .\install_python.ps1
$save_dir=Resolve-Path ~/Downloads
$project_dir = "C:\Projects"
$virtualenv_dir = $project_dir + "\virtualenvs"
$client = New-Object System.Net.WebClient
@wbroek
wbroek / genymotionwithplay.txt
Last active February 13, 2025 09:37
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)