Skip to content

Instantly share code, notes, and snippets.

View Vac1911's full-sized avatar

Andrew Mellor Vac1911

  • Connecticut, USA
View GitHub Profile
/*! grapesjs - 0.18.28 */
!function(t,e){'object'==typeof exports&&'object'==typeof module?module.exports=e():'function'==typeof define&&define.amd?define([],e):'object'==typeof exports?exports["grapesjs"]=e():t["grapesjs"]=e()}('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof window?window:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(t,'__esModule',{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&'object'==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,'default',{enumerable:!0,value:t}),2&e&&'string'!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]
@Vac1911
Vac1911 / auth.sh
Last active May 16, 2022 14:52
Sets up git authentication (for github) automatically
# Install GitHub CLI
GH=$HOME/.local/bin/gh
command -v gh
if [ "$(command -v gh)" ]; then
# GitHub CLI is globally installed
GH="$(which gh)"
elif [ -f "$GH" ]; then
# GitHub CLI is locally installed
echo "already installed"
else
{
"packages": {
"qisct/symfony-orm": {
"latest": {
"name": "qisct/symfony-orm",
"source": {
"type": "git",
"reference": "721b69b49d292291997e33102753b3df685c54ee",
"url": "git@github.com:QISCT/symfony-orm.git"
},
const i=new WeakMap;class t{constructor(t,s){this.startPaused=!1,this.disabled=!1,this.flips=new Set,this.pendingComplete=!1,this.host=t,this.flipOptions=s.flipOptions||{},this.startPaused=!!s.startPaused,this.disabled=!!s.disabled,this.onComplete=s.onComplete,i.set(this.host,this)}async add(i){var t,s;this.flips.add(i),this.startPaused&&(null===(t=i.animation)||void 0===t||t.pause()),this.pendingComplete=!0,await i.finished,this.pendingComplete&&!this.isAnimating&&(this.pendingComplete=!1,null===(s=this.onComplete)||void 0===s||s.call(this))}remove(i){this.flips.delete(i)}pause(){this.flips.forEach((i=>{var t;return null===(t=i.animation)||void 0===t?void 0:t.pause()}))}play(){this.flips.forEach((i=>{var t;return null===(t=i.animation)||void 0===t?void 0:t.play()}))}cancel(){this.flips.forEach((i=>{var t;return null===(t=i.animation)||void 0===t?void 0:t.cancel()})),this.flips.clear()}finish(){this.flips.forEach((i=>{var t;return null===(t=i.animation)||void 0===t?void 0:t.finish()})),this.flips.clear()}togg
@Vac1911
Vac1911 / install-pear.sh
Created March 16, 2021 13:10
Script to install pear
#!/usr/bin/expect
spawn wget -O /tmp/go-pear.phar http://pear.php.net/go-pear.phar
expect eof
spawn php /tmp/go-pear.phar
expect "1-11, 'all' or Enter to continue:"
send "\r"
expect eof
@Vac1911
Vac1911 / httpd.conf
Last active March 15, 2021 20:17
httpd.conf file for docker
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
@Vac1911
Vac1911 / run-httpd.sh
Last active March 15, 2021 21:01
Using this as a hack to execute a script in container instances
#!/bin/bash
# Make sure we're not confused by old, incompletely-shutdown httpd
# context after restarting the container. httpd won't start correctly
# if it thinks it is already running.
rm -rf /run/httpd/* /tmp/httpd*
curl https://gist.githubusercontent.com/Vac1911/227c70665e273bb41347ff6b2945f5ba/raw > /etc/httpd/conf/httpd.conf
exec /usr/sbin/apachectl -DFOREGROUND
@Vac1911
Vac1911 / .bashrc
Last active March 3, 2021 18:40
Using this as a hack to create a .bashrc in container instances. See comment for dockerfile code.
# .bashrc
# show full path display
PS1='\u@\h [\w]# '
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias ll='ls -lah'