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
| // GistID: 6172227 | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| struct node_t { | |
| struct node_t *next; | |
| int val; | |
| }; | |
| typedef struct node_t node; |
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 <stdio.h> | |
| typedef struct { | |
| char* bits; | |
| int size; | |
| }bitvector; | |
| bitvector* create_bitvec(int n_bits) { | |
| bitvector* vec = (bitvector*)malloc(sizeof(bitvector)); | |
| int size = sizeof(bitvector) * ceil(n_bits/8.0); |
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
| # GistID: 4511178 | |
| # To the extent possible under law, the author(s) have dedicated all | |
| # copyright and related and neighboring rights to this software to the | |
| # public domain worldwide. This software is distributed without any warranty. | |
| # You should have received a copy of the CC0 Public Domain Dedication along | |
| # with this software. | |
| # If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | |
| # base-files version 4.1-1 |
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
| # GistID: 4051243 | |
| # The prompt | |
| # enable color support of ls and also add handy aliases | |
| setopt prompt_subst | |
| autoload -U colors | |
| colors | |
| for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do | |
| eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}' | |
| eval PR_LIGHT_$color='%{$fg[${(L)color}]%}' |
NewerOlder