Skip to content

Instantly share code, notes, and snippets.

View edutrul's full-sized avatar
💭
Changing the world

Eduardo Telaya edutrul

💭
Changing the world
View GitHub Profile
@ryanpcmcquen
ryanpcmcquen / darkify_slack.sh
Last active February 23, 2023 16:08
Darkify your Slack.
#!/bin/sh
# Darkify Slack on Mac OS or Linux.
# curl https://gist.githubusercontent.com/ryanpcmcquen/8a7ddc72460eca0dc1f2dc389674dde1/raw/darkify_slack.sh | sh
if [ "`uname -s`" = "Darwin" ]; then
SLACK_INTEROP_JS="/Applications/Slack.app/Contents/Resources/app.asar.unpacked/dist/ssb-interop.bundle.js"
else
SLACK_INTEROP_JS="/usr/lib/slack/resources/app.asar.unpacked/dist/ssb-interop.bundle.js"
fi
@jmolivas
jmolivas / module_name.install
Created November 24, 2017 18:41
Update field data table and configuration storage object.
<?php
/**
* Update field data table and configuration storage
*/
function _update_field_data(
$entityType,
$field,
$valueMapping,
@AlexSkrypnyk
AlexSkrypnyk / mymodule.css
Last active April 17, 2024 08:37
Drupal 'add more' and 'remove single' AJAX buttons on multi value custom field using FormAPI
input.form-submit.button-small {
padding: 4px 8px;
font-weight: bold;
}
.container-inline input.form-submit.button-small + .ajax-progress.ajax-progress-throbber .throbber {
position: absolute;
left: 19px;
margin-top: 7px;
}
@aaronbauman
aaronbauman / p-connect.sh
Last active June 10, 2020 09:28
Connect to a Pantheon database in Sequel Pro
#!/bin/sh
# exit on any errors:
set -e
if [ $# -lt 1 ]
then
echo "Usage: $0 @pantheon-alias"
exit 1
fi
# in ~/.bashrc or ~/.bash_profile in OSX
# Jump to comment section of d.o issue, if local git branch = issue nid
alias issue='open /Applications/Google\ Chrome.app https://www.drupal.org/node/$(git symbolic-ref -q HEAD 2>/dev/null | sed '\''s/^refs\/heads\/\([0-9]*\).*/\1/'\'')#project-issue-ajax-form'
# Include/Exclude patch directory to PHPStorm to compare two patches.
alias patchl='ln -s /www/htdocs/patches/ /www/htdocs/drupal8/patches'
alias patchul='rm /www/htdocs/drupal8/patches'
@marcelosomers
marcelosomers / git-php-webhook.php
Last active October 17, 2024 17:17
A basic webhook for deploying updates to repos on Github to your local server
<?php
/**
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below).
*
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/
*
* INSTRUCTIONS:
* 1. Edit the variables below
* 2. Upload this script to your server somewhere it can be publicly accessed