Skip to content

Instantly share code, notes, and snippets.

@djburdick
djburdick / add_new_mysql_user
Created May 23, 2014 23:46
Add new mysql user. #mysql
grant all privileges on prod.* to 'produser'@'%' identified by 'password';
GRANT USAGE ON *.* TO 'newproduser'@'%' REQUIRE SSL;
flush privileges;
show grants for newproduser;
@djburdick
djburdick / mysql_ssl_connection
Created April 8, 2014 18:07
Checking mysql SSL connection. #mysql
show status like 'Ssl_cipher';
select user, host from mysql.user where ssl_type != ''
@djburdick
djburdick / gist:9374921
Created March 5, 2014 19:40
Reducing png image sizes. #imagemagick
convert -quality 75 img.png img.jpg # jpg is a lossy format so will prob be smaller than png
- or -
to keep in png format use:
pngquant --quality=0-80 img.png
@djburdick
djburdick / xcode_shortcuts.md
Last active October 19, 2018 02:36
XCode Shortcuts. #xcode

XCode shortcuts:

Setup:

  • Add a breakpoint to catch on all exceptions - under the breakpoints menu on the left click the + sign at the bottom and add “Add Exception Breakpoint”

Building:

  • Run - cmd+r
  • Build - cmd+b

Code:

@djburdick
djburdick / eclipse_commands.md
Last active August 29, 2015 13:56
Eclipse Commands

Eclipse Commands

  • right click -> properties -> java compiler 1.6

  • cmd + shift + o - clean up import statment (organize imports)

  • cmd + shift + t - skip betweeen files or classes

  • cmd + click - jump into method

@djburdick
djburdick / home_brew
Created December 10, 2013 01:46
Troubleshooting with brew. #mac
brew doctor
brew update
@djburdick
djburdick / csr_decoding
Created November 15, 2013 23:58
Decoding a CSR. #linux
cat CertificateSigningRequest.certSigningRequest | openssl asn1parse
@djburdick
djburdick / setting_up_ios_view_controller.md
Last active December 26, 2015 11:49
Setting up a view controller. #ios

Setting Up a New View Controller

  1. Create ViewController files
  2. Create nib
  3. Drag "View" Object to nib
  4. Change the "File's Owner" (in nib design view) to the controller class name
  5. ctrl drag the view outlet to the view
@djburdick
djburdick / simple_webserver
Created October 7, 2013 21:27
very simple webserver. #linux #python
$ python -m SimpleHTTPServer 8080
run in the directory of the files you want to serve
@djburdick
djburdick / obj_cheatsheet.h
Last active December 24, 2015 08:59
objective-c cheatsheet. #objc
// == Basics ==
// objective-c is the same as C (just a superset of C)
// [, @, NS are the objective-c clues (things not allowed in C)
// NS == NextStep operating system
// Mac OSX is built on objective-c
NSLog // print
NSLog(@"There are %i minutes in a %i year", minutesInAYear, numYear);