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
@amigrave
amigrave / odoo_keycdn.md
Last active June 3, 2021 23:39
Configure Odoo with Keycdn

Support for CDN has been added to Odoo in master branch.

Just tested with KeyCDN and the setup was straightforward.

##Step 1: Create a pull zone in the KeyCDN dashboard

create a pull zone

While creating the zone, enable the CORS option in the advanced features submenu. (more on that later)

@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@carsongee
carsongee / course_git_backup.sh
Created January 20, 2015 14:50
course backup to git script for edx-platform
#!/bin/bash
# This script assumes that the git repository is already cloned
# App specifics
EDXAPP_USER="edxapp"
EDXAPP_VENV="/edx/app/edxapp/venvs/edxapp"
EDXAPP_DIR="/edx/app/edxapp/edx-platform"
# Git specifics
export GIT_KEY="/edx/app/course_git_backup/git_backup_deploy"
@mdeguzis
mdeguzis / Difference between sh and bash.md
Last active April 6, 2021 17:22
Difference between sh and bash

Source: StackOverflow
By: roman-cheplyaka
Note: Full credit goes to the author and source website you see above.

What is sh

sh (or the Shell Command Language) is a programming language described by the POSIX standard. It has many implementations (ksh88, dash, ...). bash can also be considered an implementation of sh (see below).

Because sh is a specification, not an implementation, /bin/sh is a symlink (or a hard link) to an actual implementation on most POSIX systems.

@graemerocher
graemerocher / migrate-jira-to-github-issues.groovy
Last active November 19, 2024 15:23
JIRA to Github Issues Migration Script
@Grab(group='com.github.groovy-wslite', module='groovy-wslite', version='1.1.0')
@Grab(group='joda-time', module='joda-time', version='2.7')
import wslite.rest.*
import org.joda.time.*
import org.joda.time.format.*
import groovy.xml.*
import groovy.json.*
import static java.lang.System.*
import groovy.transform.*
@mitya57
mitya57 / sphinx_log.txt
Created July 17, 2015 18:44
sympy sphinx build
mkdir -p _build/latex _build/doctrees
PYTHONPATH=..: sphinx-build -b latex -d _build/doctrees-latex -D latex_paper_size= src _build/latex
Running Sphinx v1.3.1
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: 172 added, 0 changed, 0 removed
reading sources... [ 0%] aboutus
reading sources... [ 1%] gotchas
reading sources... [ 1%] guide
@lrowe
lrowe / debug-zodb-bloat.rst
Created August 6, 2015 21:59
Debugging ZODB bloat [2005]

Warning

This was written in 2005 so may be out of date. Originally published on the old Plone documentation section: https://plone.org/documentation/kb-old/debug-zodb-bloat/

About

Having spent a lot of time tracking down the cause of ZODB bloat in an Archetypes application I thought I'd share my experience in case it was useful to anyone else.

Step 1: Analysis

@miohtama
miohtama / droneio.bash
Created August 26, 2015 22:58
drone.io continuous integration + Python 3.4 + Selenium + SSH key setup for private repos + codecov coverage
#!/bin/bash
#
# Setup test running for Ubuntu 12.02 / Drone IO
#
# As drone.io build command put:
#
# # Launch the droneio test script from the repo
# bash bin/droneio.bash # Whereever you put this script in your source code control
#
#
@petri
petri / registry.xml
Created September 2, 2015 09:34
Define a Choice field for Plone portal registry, with a vocabulary to choose from and a default value
<registry>
<record name="some.record.identifier">
<field type="plone.registry.field.Choice">
<title>TheTitle</title>
<description>TheDescription</description>
<value_type type="plone.registry.field.TextLine" />
<values purge="true">
<element>choice 1</element>
<element>choice 2</element>