Skip to content

Instantly share code, notes, and snippets.

@jivkokgist
jivkokgist / App.config: trace listeners - console and text file
Created June 27, 2012 17:17
App.config: trace listeners - console and text file
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.diagnostics>
<trace autoflush="true">
<listeners>
<add name="logListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="trace.log" />
<add name="consoleListener" type="System.Diagnostics.ConsoleTraceListener"/>
</listeners>
</trace>
</system.diagnostics>
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<_locDefinition xmlns="urn:locstudio">
<_locDefault _loc="locNone" />
<_locTag _loc="locData">Title</_locTag>
<_locTag _loc="locData">Description</_locTag>
<_locTag _loc="locData">Author</_locTag>
<_locTag _loc="locData">ToolTip</_locTag>
</_locDefinition>
<CodeSnippet Format="1.0.0">
@jivkokgist
jivkokgist / .gitignore
Created June 28, 2012 00:10 — forked from smoothfriction/.gitignore
.gitignore for visual studio
#OS junk files
[Tt]humbs.db
*.DS_Store
#Visual Studio files
*.[Oo]bj
*.user
*.aps
*.pch
*.vspscc
@jivkokgist
jivkokgist / gist:3009195
Created June 28, 2012 04:56 — forked from srmor/gist:3009050
Sublime Text 2 - Useful Shortcuts
h1. Sublime Text 2 - Useful Shortcuts (Mac OS X)
h2. General
| *⌘T* | go to file |
| *⌘⌃P* | go to project |
| *⌘R* | go to methods |
| *⌃G* | go to line |
| *⌘KB* | toggle side bar |
| *⌘⇧P* | command prompt |
@jivkokgist
jivkokgist / base64.js
Created June 29, 2012 04:13 — forked from THEtheChad/base64.js
Encode/Decode base64 URL params
/**
* app.util.base64 encode / decode
* http://www.webtoolkit.info/
**/
app.util.base64 = {
// private property
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
// public method for encoding
@jivkokgist
jivkokgist / do.sh
Created September 28, 2012 15:24 — forked from alexandresalome/do.sh
Generate self-signed SSL certificate
# Generate a private key
openssl genrsa -des3 -out server.key.org 1024
# Generate a CSR: Certificate Signing Request
openssl req -new -key server.key.org -out server.csr
# Remove password from key
openssl rsa -in server.key.org -out server.key
# Generate a self-signed certificate
@jivkokgist
jivkokgist / .gitignore
Created September 28, 2012 15:32 — forked from codesburner/.gitignore
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# NB: if you are storing "built" products, this WILL NOT WORK,
# and you should use a different .gitignore (or none at all)
# This file is for SOURCE projects, where there are many extra
# files that we want to exclude
#
# For updates, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#########################
@jivkokgist
jivkokgist / bashprombt
Created September 28, 2012 15:36 — forked from sebk/bashprombt
better bash prompt with git branch
#source: http://asemanfar.com/Current-Git-Branch-in-Bash-Prompt
c_cyan=`tput setaf 6`
c_red=`tput setaf 1`
c_green=`tput setaf 2`
c_sgr0=`tput sgr0`
parse_git_branch ()
{
if git rev-parse --git-dir >/dev/null 2>&1
@jivkokgist
jivkokgist / about.md
Created October 1, 2012 23:28 — forked from kyokpae/about.md
Programming Achievements: How to Level Up as a Developer

Programming Achievements: How to Level Up as a Developer

  1. Select a particular experience to pursue.
  2. Pursue that experience to completion. (Achievement unlocked!)
  3. Reflect on that experience. Really soak it in. Maybe a blog post would be in order?
  4. Return to Step 1, this time selecting a new experience.

This gist is a fork of this other gist which is itself a fork of a gist from this blog post. And the introductions come from yet another gist.

@jivkokgist
jivkokgist / gist:3831140
Created October 4, 2012 02:28 — forked from marcuswestin/gist:3831043
NSURLConnection example
- (void)startLoading {
self.connection = [[NSURLConnection alloc] initWithRequest:self.request delegate:self];
if (!self.connection) {
[self.client URLProtocol:self didFailWithError:nil];
}
}
- (void)stopLoading {
[self.connection cancel];
self.connection = nil;