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
View tornado-async-process-mixin.py
# Copyright (c) 2010, Philip Plante of EndlessPaths.com
#
# 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
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
@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:

@soemarko
soemarko / theme.html
Created Nov 26, 2011
embed github gist to tumblr
View theme.html
<!-- Add the following lines to theme's html code right before </head> -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script>
<!--
Usage: just add <div class="gist">[gist URL]</div>
Example: <div class="gist">https://gist.github.com/1395926</div>
-->
View ssh.rb
#!/usr/bin/env ruby
# Inspired by http://jeffmiller.github.com/2011/01/10/ssh-host-color
# == What this version does:
# 1) Launch an SSH process
# 2) Grab the IP that SSH connected to
# 3) Hash that IP and generate a colour from it
# 4) Change Terminal.app's background colour to that colour.
# 5) Change the colour back when SSH exits.
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
@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 /_
}
@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);
@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);
}
@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.