Skip to content

Instantly share code, notes, and snippets.

View darrylhebbes's full-sized avatar

Darryl Hebbes darrylhebbes

  • Berlin, Germany
View GitHub Profile
@edwardbeckett
edwardbeckett / init.js
Created January 23, 2013 19:52
Encapsulated Angular Module
//Define a function scope, variables used inside it will NOT be globally visible.
(function () {
var
//the HTTP headers to be used by all requests
httpHeaders,
//the message to be shown to the user
message,
@NapoleonWils0n
NapoleonWils0n / cipher.sh
Created November 11, 2012 22:33
macosx: cipher encrypt files with ssl
#!/bin/sh
#===================================================================================================================================#
# cipher.sh
# Encypting files on the Mac with Openssl
# Openssl aes-256 encryption with public private keys and a password
# Openssl keys stored in aes-256 encryption dmg
#  dmg and openssl password stored in secondary keychain that isnt unlocked at login
#===================================================================================================================================#
@NapoleonWils0n
NapoleonWils0n / encrypted_dmg_for_dropbox.sh
Created November 3, 2012 23:46
macosx: create an encrypted dmg for dropbox
#!/bin/sh
# Create an encrypted dmg for Dropbox
# Command notes: we echo the password to hdiutil and use the -stdinpass to recieve it via stdin
echo -n "password" | hdiutil create -encryption AES-256 -size 5m -fs HFS+J -stdinpass -volname MountedVolumeName DiskImageName.dmg
# attach and detach the dmg
hdiutil attach /path/to/dmg/DiskImageName.dmg
@miguel-negrao
miguel-negrao / create_ad_hoc.applescript
Created October 29, 2012 23:22
automate ad-hoc network creation
-- to create. This will also attempt to set the network location
-- to that name as well.
-- Set NetworkPassword to be your wireless network password. It MUST BE
-- 13 characters long (or 26 hex digits).
property NetworkName : "helloworld"
property NetworkPassword : "77777"
property CreateMenuName : "Criar rede…"
@m3nd3s
m3nd3s / NERDTree.mkd
Last active November 23, 2023 13:45
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@areina
areina / emacs-email-setup.md
Created October 12, 2012 15:00
Manage your email in emacs with mu4e

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e
@railwaycat
railwaycat / mac-switch-meta.el
Created August 28, 2012 13:43
meta key switch
;; Keybonds
(global-set-key [(hyper a)] 'mark-whole-buffer)
(global-set-key [(hyper v)] 'yank)
(global-set-key [(hyper c)] 'kill-ring-save)
(global-set-key [(hyper s)] 'save-buffer)
(global-set-key [(hyper l)] 'goto-line)
(global-set-key [(hyper w)]
(lambda () (interactive) (delete-window)))
(global-set-key [(hyper z)] 'undo)
@foca
foca / stateful.js
Created August 25, 2012 08:23
Stateful is a simple implementation of the State Pattern for JavaScript.
// Stateful is a simple implementation of the state pattern for javascript.
//
// Read more on this design pattern here:
// -> http://sourcemaking.com/design_patterns/state
//
// Initialize Stateful by passing it an object, the name of the initial state
// (defaults to "default"), and an optional hash of interfaces that will be
// applied for each state. If these interfaces are not passed, they default to
// the object's constructor's States property. So, for example:
//
@ShriramK
ShriramK / learning.txt
Created August 6, 2012 11:47
Scrapy links
#0)
https://www.ibm.com/developerworks/linux/library/l-spider/#N101C6
http://www2003.org/cdrom/papers/refereed/p096/p96-broder.html
http://stackoverflow.com/questions/5834808/designing-a-web-crawler/10763251#10763251
http://stackoverflow.com/questions/3359712/a-web-crawler-in-python-where-should-i-start-and-what-should-i-follow-help-n
http://www.daniweb.com/software-development/python/threads/237220/how-can-i-write-my-web-crawler-for-data-extraction
http://simoraman.com/2011/04/17/web-crawler-in-python/
http://www.quora.com/What-is-the-best-data-structure-for-maintaining-URLs-that-have-been-visited-by-a-Web-crawler
http://www.slideshare.net/gnap/design-and-implementation-of-a-high-performance-distributed-web-crawler
http://www.dreamincode.net/forums/topic/184832-web-crawler/
@boneskull
boneskull / gist:3138069
Created July 18, 2012 18:56
angular directive to fadeIn/hide
/**
* Fades an element in when the model changes. Restricted to attributes.
*
* Usage:
*
* <div di-fade-in="foo"/>
*/
di.directive('diFadeIn', function () {
return {