Skip to content

Instantly share code, notes, and snippets.

View gisu's full-sized avatar

sascha fuchs gisu

View GitHub Profile
@zulfajuniadi
zulfajuniadi / .htaccess
Created December 25, 2013 16:02
Enable CORS via htaccess.
Header add Content-Type "application/json"
Header add Access-Control-Allow-Methods "GET,HEAD,POST,PUT,DELETE,OPTIONS"
Header add Access-Control-Allow-Headers "Auth-Token,Content-Type"
Header add Access-Control-Allow-Origin "*"
@pascalpoitras
pascalpoitras / config.md
Last active July 5, 2024 02:22
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@bogutski
bogutski / MySQL local dump and import to remote by SSH
Created August 24, 2016 22:27
Bash script for import from local MySQL database to remote DB through SSH
lclDBName="value"
lclDBUser="value"
lclDBPass="value"
RemoteDBName="value"
RemoteDBUser="value"
RemoteDBPass="value"
RemoteHost="localhost"
lclHost="localhost"
@stramel
stramel / css-var-polyfill.js
Created September 6, 2016 21:48
CSS Variable Polyfill
/*
TODO:
X Maybe account for defaults: color: var(--header-color, blue);
- Verify cross domain working or not (it is working from dropbox)
- Option to wait to apply anything until all <link>s are parsed or inject what we have and update as each <link> returns
- Need to test on a more complex CSS file
- Option to save parsed file in local/session storage so there isn't a delay on additional page loads. Could only do it for links (with URLs to use as keys) and style blocks with IDs of some sort
- Need to test more complex values like rgba(255,0,0,0.5); and something with !important
- Try multiple links
- Local links
@EX3MP
EX3MP / migradeDB.sh
Last active February 10, 2017 10:27
Einfaches bash zum mysqldump zwischen 2 dbs (WIP! muss noch getestet werden!)
#!/bin/bash
# based on https://gist.github.com/Siteograf/09c1e1c5655105362e754aa6640e6ffd
# use with ./migradeDB.sh
# or like ./migradeDB.sh 1 y
#
# required mysql or mysqldump at HOST1 & HOST2!
# solltet ihr "bad pattern: --password=" bekommen, funktioniert euer passwort wegen eines Sonderzeichen nicht
HOST1_isREMOTE=false
HOST1_SSH_USER="root" # required if host 1 is remote
@mfd
mfd / webfonts.md
Last active November 25, 2023 05:48
webfont convert

Make WEBFONTS (woff/woff2/eot)

Installation

Install Webfontools from Homebrew:

brew tap bramstein/webfonttools
brew update

brew install sfnt2woff-zopfli
@martinherweg
martinherweg / downloadCraftPlugins.js
Last active July 24, 2017 12:20
Allows you to install new Craft
/**
* Download Craft Plugins
*
* @package generator-mh-boilerplate
* @author Martin Herweg <info@martinherweg.de>
*/
const inquirer = require('inquirer');
const download = require('download');
const ProgressBar = require('progress');
@rayfranco
rayfranco / README.md
Last active June 1, 2021 07:49
Inline SVG with Nuxt

Inline SVG with Nuxt

I was looking for a SSR and scoped styles ready solution to implement inline SVG with Nuxt

You need svg-inline-loader and xmldom to be installed.

@kevyworks
kevyworks / prep-ncv-env.sh
Last active April 14, 2022 15:54
Prepare Dev Machine for: Node Composer & Laravel Valet
# MOJAVE: https://gist.github.com/kevmt/476716bfb0383d3fda699e4fcacc6470
# install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Terminal Aliases
echo "alias artisan='php $PWD/artisan'" >> ~/.bash_profile
echo "export NVM_DIR=~/.nvm" >> ~/.bash_profile
echo "source $(brew --prefix nvm)/nvm.sh" >> ~/.bash_profile
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active June 9, 2024 19:08
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {