Skip to content

Instantly share code, notes, and snippets.

View demircimurat's full-sized avatar

Murat Demircioglu demircimurat

View GitHub Profile
#!/bin/bash
# rotate ALL users, including yourself
# allUsers=$(aws iam list-users --output text | cut -f 6);
# read from a file, one username per line
# preferably set their username to their email address
allUsers=$(cat ./user-names.txt);
for userName in $allUsers; do

MySQL Cheatsheet

This is a collection of the most common commands I run while administering Mysql databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Mysql has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu 14.04

https://help.ubuntu.com/14.04/serverguide/mysql.html

sudo apt-get update
@demircimurat
demircimurat / gist:0f4cbc23b7a168f16c84
Last active August 29, 2015 14:12
Object or Array to Dynamic in C#
/*
* based on Jorge Fioranelli's code..
* http://blog.jorgef.net/2011/06/converting-any-object-to-dynamic.html
*/
public static class Extensions
{
public static dynamic ToDynamic(this object value)
{
if (value.IsListOrArray ()) {
@demircimurat
demircimurat / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console