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
| jarnal $(date +"notes_%b_%d_%Y.jaj" | tr '[:upper:]' '[:lower:]') |
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
| " Lets me know how much time I've spent editing a file | |
| " Keyboard shortcut -> \dt | |
| augroup TimeSpentEditing | |
| au! | |
| au BufWinEnter * if !exists('b:tstart')|let b:tstart=reltime()|en | |
| augroup END | |
| function! TimeSpentEditing() | |
| let secs = str2nr(reltimestr(reltime(b:tstart))) | |
| let hours = secs / 3600 |
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 | |
| import subprocess | |
| import os | |
| F_DEVNULL = open(os.devnull, 'w') | |
| p = subprocess.Popen(["git", "rev-parse", "--show-toplevel"], | |
| stdout=subprocess.PIPE, stderr=F_DEVNULL) | |
| repo_root, err = p.communicate() | |
| repo_root = repo_root.strip() |
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 | |
| import subprocess | |
| p = subprocess.Popen(["git", "log", "--format='%s'"], stdout=subprocess.PIPE) | |
| out, err = p.communicate() | |
| # Keep going until we don't find a "fixup! " | |
| fixup_count = 0 | |
| max_list_size = 10 | |
| commits = out.split('\n')[:max_list_size] |
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
| /* myfile.c */ | |
| #include<stdio.h> | |
| /* template.html */ | |
| <pre>{% include "myfile.c" %}</pre> | |
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
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #define BUFSIZE 80 | |
| int main(){ | |
| char *cwd1; | |
| char cwd2[BUFSIZE]; | |
| int result; | |
| // Get the current working directory. This is vulnerable to buffer |
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
| # Yay school. | |
| def find_largest(mylist): | |
| if len(mylist) == 1: | |
| return 0 | |
| elif len(mylist) == 2: | |
| if mylist[0] > mylist[1]: | |
| return 0 | |
| else: | |
| return 1 | |
| else: |
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
| # Redirect everything to the main site. | |
| server { | |
| server_name www.mysite.com; | |
| return 301 http://mysite.com$request_uri; | |
| } | |
| server { | |
| server_name mysite.com; | |
| location / { try_files $uri @flaskapp; } | |
| location @flaskapp { |
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
| (Precise)~/lab/c$ gcc -std=c99 -Wall ex2.c -o ex2.o | |
| ex2.c: In function ‘splitString’: | |
| ex2.c:4:5: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration] | |
| ex2.c:4:15: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default] | |
| ex2.c:10:9: warning: implicit declaration of function ‘isdigit’ [-Wimplicit-function-declaration] | |
| ex2.c:25:5: warning: implicit declaration of function ‘sprintf’ [-Wimplicit-function-declaration] | |
| ex2.c:25:5: warning: incompatible implicit declaration of built-in function ‘sprintf’ [enabled by default] | |
| ex2.c:25:5: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘char (*)[40]’ [-Wformat] | |
| ex2.c:26:5: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] | |
| ex2.c:26:5: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default] |
This file has been truncated, but you can view the full file.
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
| Starting program: /Users/jmccullough/Sites/github/mruby/bin/mrbc -c /web/github/mrbc-playground/rubyfile.rb | |
| Reading symbols for shared libraries +. done | |
| Program received signal EXC_BAD_ACCESS, Could not access memory. | |
| Reason: KERN_PROTECTION_FAILURE at address: 0x00007fff5f3ffff8 | |
| 0x00000001000340f3 in sym_hash_func (mrb=0x100800000, s=Cannot access memory at address 0x7fff5f3ffff8 | |
| ) at symbol.c:22 | |
| 22 { | |
| #0 0x00000001000340f3 in sym_hash_func (mrb=0x100800000, s=Cannot access memory at address 0x7fff5f3ffff8 | |
| ) at symbol.c:22 |