Skip to content

Instantly share code, notes, and snippets.

Jehiah Czebotar jehiah

Block or report user

Report or block jehiah

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@stfeng2
stfeng2 / cloud_sql_flags.md
Last active Mar 7, 2019
Cloud SQL Flags Tuning
View cloud_sql_flags.md

Important Notice

  • ❗️ All flags and settings described here are subject to change without any notice.
  • Last update: September 2017

Introduction

This document describes a set of MySQL flags that have been tuned in Google Cloud SQL (Second Generation) to make the out-of-box experience better on Google Cloud. This is for your reference only, with the hope that some of the settings might also be useful outside the Google Cloud environment.

innodb_buffer_pool_size

@alekseykulikov
alekseykulikov / index.md
Last active Feb 20, 2019
SUIT CSS naming convention for React.js application
View index.md

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

View gist:6d8fc3fd0d67b6470f7d
Blog post: Ryan Huber - Distributed Security Alerting
https://medium.com/several-people-are-coding
Video: Zane Lackey - Building a Modern Security Organization
https://duo.com/blog/duo-tech-talk-building-a-modern-security-engineering-organization
Krebs on Security Blog
https://www.krebsonsecurity.com
Sony Breach
@amitsaxena
amitsaxena / gist:9cb0712e572c39a41edc
Last active Jun 17, 2016
CustomURL: Launch app if app is installed, else open an alternate URL (Android all browsers)
View gist:9cb0712e572c39a41edc
<script type="text/javascript">
var custom = "myapp://custom_url";
var alt = "http://mywebsite.com/alternate/content";
var g_intent = "intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end";
var timer;
var heartbeat;
var iframe_timer;
function clearTimers() {
clearTimeout(timer);
View Facebook Lookback Downloader
var xLBD = {};
xLBD.c = function (){
xLBD.f = unescape(document.querySelector("[flashvars]").getAttribute("flashvars")).substring(7);
xLBD.f = JSON.parse(xLBD.f.substring(0, xLBD.f.lastIndexOf("}") + 1)).video_data[0].hd_src;
xLBD.a = "<div style='position:absolute;top:100px;height:300px;left:15%;background:#fff;border:10px solid #000;font-size:5em;padding:100px;'>Click <a download='lookback.mp4' href='"+xLBD.f+"'>here<\/a> to download your lookBack video.</div>";
document.body.innerHTML += xLBD.a;
}
if(document.readyState == "complete")
xLBD.c();
else window.onload = xLBD.c;
@amitsaxena
amitsaxena / gist:8601424
Last active Jun 1, 2016
CustomURL: Launch app if app is installed, else open an alternate URL (iOS all browsers)
View gist:8601424
<script type="text/javascript">
var timer;
var heartbeat;
var lastInterval;
function clearTimers() {
clearTimeout(timer);
clearTimeout(heartbeat);
}
@rasschaert
rasschaert / nsq-0.2.24.linux-amd64.go1.2.tar.gz-to-rpm.bash
Last active Jan 3, 2016
Creates an RPM package for NSQ (distributed messaging platform written in Golang). Tested on CentOS 6 x86_64 with EPEL and Golang 1.2.
View nsq-0.2.24.linux-amd64.go1.2.tar.gz-to-rpm.bash
#!/bin/bash
echo 'Downloading pre-built binaries'
wget https://s3.amazonaws.com/bitly-downloads/nsq/nsq-0.2.24.linux-amd64.go1.2.tar.gz
echo 'Extracting archive'
tar xzf nsq-0.2.24.linux-amd64.go1.2.tar.gz
echo 'Creating correct directory structure'
mkdir -p nsq-0.2.24.linux-amd64.go1.2/usr/local/
mv nsq-0.2.24.linux-amd64.go1.2/{bin,share} nsq-0.2.24.linux-amd64.go1.2/usr/local/
@kr
kr / pre-commit
Last active Nov 11, 2016
Here's a goimports git pre-commit hook.Put this file in .git/hooks.
View pre-commit
#!/usr/bin/env bash
# Redirect output to stderr.
exec 1>&2
# list staged go files
# ignore trees starting with "_", like the go tool
lsgo() {
git ls-files|egrep '.*[.]go$'|fgrep -v /_
}
@tmcw
tmcw / index.html
Created Dec 14, 2012
Unknown Pleasures
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<title></title>
<style>
body {
background:#000;
font: 10px sans-serif;
width:960px;
margin:0 auto;
@mbostock
mbostock / .block
Last active Feb 9, 2016 — forked from dchud/README.md
Streams
View .block
license: gpl-3.0
You can’t perform that action at this time.