This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
import lightningcss from '/usr/lib/node_modules/lightningcss/node/index.js'; | |
import fs from 'fs/promises'; | |
import * as path from 'path'; | |
const {transform} = lightningcss; | |
if (process.argv.length!=4) { | |
console.log('Usage: compile.js <inputfile> <outputfile>'); | |
process.exit(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function hook_commerce_inline_form_customer_profile_alter(&$inline_form,FormStateInterface $form_state,array &$complete_form) { | |
$inline_form['#after_build'][]='after_build'; | |
} | |
function after_build(&$form) { | |
$address=&$form['address']['widget'][0]['address']; | |
$address['field_salutation']=$form['field_salutation']; | |
$address['field_salutation']['#weight']=-3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
list=`drush ev 'echo implode("\n", Drupal::service("config.factory")->listAll("core.base_field_override."))' | \ | |
grep -Po "([^\.]+\.[^\.]+)(?=\.uid$)"` | |
changed=false | |
while IFS= read -r item; do | |
parts=(${item//./ }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SerializableClosure { | |
private $args; | |
private $code; | |
function __construct($args,$code) { | |
$this->args=$args; | |
$this->code=$code; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SERVER="matrix.mycompany.com" | |
echo -e "\e[97mEnter user you'd like to deactivate\e[0m"; | |
read user | |
if [ "$user" == "" ]; then | |
echo "User required."; | |
exit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install necessary packages | |
RUN apt-get install -y bsdtar | |
RUN apt-get install -y cmake | |
RUN apt-get install -y libfreetype6-dev | |
RUN apt-get install -y libfontconfig-dev | |
RUN apt-get install -y libjpeg-dev | |
RUN apt-get install -y libcairo-dev | |
RUN apt-get install -y libopenjp2-7-dev | |
RUN apt-get install -y libffi-dev | |
RUN apt-get install -y libtiff-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -e "\e[97mPlease enter password for Synapse/Matrix root user:\e[0m"; | |
read -s password | |
echo -e "\e[97mEnter user you'd like to deactivate\e[0m"; | |
read user | |
url_user=`echo -n "$user" | jq -s -R -r @uri` | |
json=`curl -s --insecure -XPOST -d '{"type":"m.login.password", "user":"root", "password":"'$password'"}' "https://localhost:8448/_matrix/client/r0/login"` | |
access_token=`echo "$json" | jq -r ".access_token"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## CAUTION: | |
## This script will remove (hopefully) all trace of the given room ID from | |
## your homeserver.db | |
## Do not run it lightly. | |
set -e |