Skip to content

Instantly share code, notes, and snippets.

View Minasokoni's full-sized avatar
:octocat:

Robert Barnwell Minasokoni

:octocat:
View GitHub Profile
@Minasokoni
Minasokoni / ba-detach.js
Created October 11, 2019 22:25 — forked from cowboy/ba-detach.js
JavaScript detach: detach a node from the DOM, optionally reattaching it when done.
/*!
* JavaScript detach - v0.2 - 5/18/2011
* http://benalman.com/
*
* Copyright (c) 2011 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
function detach(node, async, fn) {
@Minasokoni
Minasokoni / adminer_setup.sh
Created August 12, 2019 05:40 — forked from zloynemec/adminer_setup.sh
Secure adminer nginx setup
# Secure adminer setup
# Author Taras Kozlov
# download adminer to separate directory
mkdir -p /var/www/admin
cd /var/www/admin
wget http://www.adminer.org/latest.php -O adminer.php
echo '<?php phpinfo(); >' > info.php
sudo -i
@Minasokoni
Minasokoni / app.js
Created July 22, 2019 17:51 — forked from papandreou/app.js
graphqlInMultipartFormDataMiddleware.js
const { graphqlExpress } = require('graphql-server-express');
const graphQlTools = require('graphql-tools');
const schema = graphQlTools.makeExecutableSchema({
typeDefs: schemaText,
resolvers: {
Mutation: {
async uploadFiles(obj, { input }, req, info }) {
// ...
try {
@Minasokoni
Minasokoni / commits.vue
Created June 21, 2019 16:34 — forked from yyx990803/commits.vue
Vue examples comparisons in 2.x and function-based APIs
<template>
<div id="demo">
<h1>Latest Vue.js Commits</h1>
<template v-for="branch in branches">
<input type="radio"
:id="branch"
:value="branch"
name="branch"
v-model="currentBranch">
<label :for="branch">{{ branch }}</label>
@Minasokoni
Minasokoni / config.yml
Created February 28, 2019 15:54 — forked from ThiagoBarradas/config.yml
Auto rollback with circleci 2.0
## 1) GENERATE AN API TOKEN (https://circleci.com/gh/<gh-user>/<gh-repo-name>/edit#api)
## 2) ADD ENV VAR WITH NAME "CIRCLE_API_TOKEN" WITH PREVIOUS GENERATED TOKEN
version: 2
jobs:
build:
machine: true
steps:
- run:
name: Build App
@Minasokoni
Minasokoni / gist:e54e4a89f4129a4436e0f61fc05441c9
Created December 7, 2018 00:21 — forked from atadams/gist:3085530
Terminal: Defaults Write
# ~/.osx — http://mths.be/osx
###############################################################################
# General UI/UX #
###############################################################################
# Menu bar: disable transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Disable the “Are you sure you want to open this application?” dialog
@Minasokoni
Minasokoni / DetectAdBlock.js
Created September 10, 2018 06:29 — forked from hotdang-ca/DetectAdBlock.js
Detect AdBlockers from a React Component
/**
*
* Detect Ad Blockers
*
* Copyright (c) 2017 James Robert Perih
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
@Minasokoni
Minasokoni / .block
Created August 15, 2018 21:21 — forked from mtranggit/.block
Make d3 responsive
license: mit
@Minasokoni
Minasokoni / widget.js
Created October 3, 2017 22:38 — forked from lukencode/widget.js
Starter template for creating jsonp embeddable widgets.
(function () {
var scriptName = "embed.js"; //name of this script, used to get reference to own tag
var jQuery; //noconflict reference to jquery
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
var jqueryVersion = "1.8.3";
var scriptTag; //reference to the html script tag
/******** Get reference to self (scriptTag) *********/
var allScripts = document.getElementsByTagName('script');
@Minasokoni
Minasokoni / max_width_email.html
Created May 15, 2017 19:22 — forked from elidickinson/max_width_email.html
Email Template trick: max-width with outlook
<!--[if mso]>
<center>
<table><tr><td width="580">
<![endif]-->
<div style="max-width:580px; margin:0 auto;">
<p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>