Skip to content

Instantly share code, notes, and snippets.

@dkebler
dkebler / widevine.sh
Last active March 15, 2024 21:08
Install WidevineCDM into chromium
#!/bin/bash
# -eux
function confirm()
{
echo -n "$@ "
read -e answer
for response in y Y yes YES Yes Sure sure SURE OK ok Ok
do
if [ "_$answer" == "_$response" ]
then
@ravibhure
ravibhure / git_rebase.md
Last active September 18, 2024 06:34
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@scossar
scossar / hooks-app.yml
Created April 17, 2015 20:29
hooks for Discourse app.yml to load a custom Discourse repo into the docker image
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- mkdir -p plugins
- git clone https://github.com/discourse/docker_manager.git
- exec:
cd: $home
cmd:
@cedricziel
cedricziel / README.md
Last active October 27, 2021 08:12
TYPO3 Extension with 3rd part composer dependencies. composer.json is placed in Resources/Private - Updated

Motivation

As long as composer support in CMS is "not there yet", you need to get around somehow.

Say you want to use the (awesome) markdown library, you need a way to get it in.

How

  1. Use a container extension with a private namespace
@digitaljhelms
digitaljhelms / post-rewrite
Created September 22, 2014 14:49
Git hook to call `git submodule update` automatically.
#!/bin/sh
echo "[post-rewrite hook: $1]"
# quick script to call "git submodule update" automatically if the
# .gitmodules file is changed
changedfiles=( `git diff-tree --no-commit-id --name-only HEAD@{1} HEAD` )
if [[ "${changedfiles[*]}" =~ ".gitmodules" ]]; then
echo "initializing & updating submodule(s)"
@benjaminrau
benjaminrau / gist:9896177
Created March 31, 2014 16:25
Access Media Files related to TYPO3 pages / FAL on page properties
{v:resource.record.fal(record: page, field: 'media', table: 'pages') -> v:iterator.extract(key: 'id') -> v:iterator.first() -> v:var.set(name: 'pageMedia')}
<f:if condition="{pageMedia}">
<v:page.header.meta name="og:image" content="{f:uri.image(src: pageMedia, treatIdAsReference: 1) -> v:format.prepend(add: '{v:page.siteUrl() -> v:format.substring(length: \'-1\')}')}" />
</f:if>
@elidickinson
elidickinson / html_email_buttons_1.html
Last active September 9, 2024 10:44
HTML email buttons that work
<div>
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://www.EXAMPLE.com/" style="height:40px;v-text-anchor:middle;width:300px;" arcsize="10%" stroke="f" fillcolor="#d62828">
<w:anchorlock/>
<center style="color:#ffffff;font-family:sans-serif;font-size:16px;font-weight:bold;">
Button Text Here!
</center>
</v:roundrect>
<![endif]-->
<![if !mso]>
@digitaljhelms
digitaljhelms / post-rewrite
Last active February 4, 2024 14:15
Git hook to call `bower install` and `npm install` automatically.
#!/bin/sh
echo "[post-rewrite hook: $1]"
# by noahgrant & digitaljhelms
#
# quick script to call "bower install" and "npm install" automatically if
# bower.json or package.json are changed, respectively
#
# this assumes one top-level file for each
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active September 19, 2024 05:58
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@noelboss
noelboss / page_tsconfig.txt
Created November 21, 2013 14:18
How to configure gridelements for Typo3 purely with TypoScript and TSconfig and thus living in files. Based on this article: http://www.networkteam.com/blog/post/gridelements-professionell-nutzen.html
# Page TSConfig:
tx_gridelements.setup {
# ID of Element
1 {
title = Two Columns
config {
colCount = 2
rowCount = 1
rows {
1 {