Skip to content

Instantly share code, notes, and snippets.

View chancez's full-sized avatar

Chance Zibolski chancez

View GitHub Profile
void SkillNode::insert(SkillNode*& root, const Skill& aSkill)
{
if (!root)
{
Skill mySkill(aSkill);
root = new SkillNode(mySkill);
}
}
VI_MODE="i"
function zle-line-init zle-keymap-select {
VI_MODE="${${KEYMAP/vicmd/c}/(main|viins)/i}"
if [ "$VI_MODE" = "i" ]; then
zsh_vi_status="[%{$fg[red]%}${VI_MODE}%{$reset_color%}]$"
else
zsh_vi_status="[%{$fg[green]%}${VI_MODE}%{$reset_color%}]$"
fi
zle reset-prompt
}
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName chancez.net
ServerAlias www.chancez.net
DocumentRoot /home/chance/public_html/chancez.net/
</VirtualHost>
@chancez
chancez / gist:3703023
Created September 11, 2012 23:34
yourerror
Starting program: /home/chance/a.out
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7a8f3b1 in getc () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) backtrace
#0 0x00007ffff7a8f3b1 in getc () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00000000004006f2 in hex2ascii (fpIn=0x0, c1=0, c2=0) at test.c:25
#2 0x00000000004007ab in main () at test.c:47
bool list::insert (const data& aData)
{
node * prev = NULL;
node * curr = head;
//traverse to find the position to insert
while (curr!=NULL && curr->item < aData)
{
prev = curr;
curr = curr->next;
module.exports = (app) ->
app.get('/', (req, res) ->
res.render('default')
)
app.get('/login/', (req,res) ->
res.render('login')
)
list of pw chars = [a,b,c,d..1,2,3,...(,),-,+] ect ect.
how long do you want your password to be?
pwlen = whattheyentered + 1
string aPassword = new string[pwlen]
for (i = 0, i < pwnlen, i++) {
//handle random appropriately to your language, this is an example
aPassword[i] = random(from 0 to length(lostofpwchars) )
valid_chars = ''
for ASCII in [32..126]
curr = String.fromCharCode(ASCII)
valid_chars += curr
gen_pwd = (pw_len) ->
aPW = ''
for i in [0..pw_len]
x = Math.floor(Math.random() * valid_chars.length)
aPW += valid_chars.charAt(x)
/*
* =====================================================================================
*
* Filename: person.cpp
* Author: Chance Zibolski (CZ), [email protected]
* Organization:
*
* =====================================================================================
*/
#include <stdlib.h>
DocumentRoot "/var/www/local_web/"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/local_web/">