SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Table-Name'
I hereby claim:
- I am realdubb on github.
- I am wachira (https://keybase.io/wachira) on keybase.
- I have a public key whose fingerprint is 9902 4557 F123 B82E B248 EF0E E603 57A1 7271 5DCB
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import argparse | |
import datetime | |
def main(): | |
console_prefix = "$ " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Checking for logs in /var/log | |
# Clean up space | |
# source http://www.omgubuntu.co.uk/2016/08/5-ways-free-up-space-on-ubuntu | |
sudo apt-get autoremove --purge | |
# Check space | |
df -h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 404-check.sh - Script to test for 404s | |
# author: lkptrzk | |
# Usage: | |
# Assuming a file named 'input' with one URL per line | |
# the following command will output which files were 404s: | |
# cat input | xargs 404-check.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Dirty script to check if any forks in ahead of master and open that branch commitlist | |
Warning: Uses alot of api calls | |
""" | |
import requests | |
from requests.auth import HTTPBasicAuth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference: http://ss64.com/nt/syntax-variables.html | |
# Startup Scripts Path | |
# This path is not available in Win 10 | |
Currently using this on Win7 | |
C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup | |
# Available to both Win7/10 | |
%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\StartUp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: http://www.howtogeek.com/168147/add-public-ssh-key-to-remote-server-in-a-single-command/ | |
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference http://stackoverflow.com/a/10304316/3826642 | |
# | |
# Given list of users 'bobby.flay' and 'con.artist', I want to find which of these don't exist in my Table user_table in column user_name | |
# 'user_namex' - can be anything you want | |
# a derived table name in FROM subselect is required | |
Select * from ( | |
SELECT 'bobby.flay' user_namex UNION | |
SELECT 'con.artist' | |
) derived_table_name_required |