This file contains 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
/* $(CC) dft_example.c -lm -g -Wall */ | |
#include <stdio.h> | |
#include <complex.h> | |
#include <math.h> | |
#define BUCKETS 16 | |
/* | |
* XXX: looses any phase information. | |
* len samples go in and len freqs come out. |
This file contains 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
## put this at the bottom of your ~/.bashrc | |
## | |
[[ -n ${TMUX} ]] && return | |
[[ -n ${FALLBACK_SHELL} ]] && return | |
[[ ${TERM} != "linux" ]] && return | |
if [[ "$(tty)" = /dev/tty1 ]]; then | |
return | |
fi | |
exec ~/bin/bgterm -- tmux -u |
This file contains 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
package main | |
import ( | |
"fmt" | |
"path/filepath" | |
"regexp" | |
"log" | |
) | |
// includeName checks if the name should be allowed or not based on the exclude patterns | |
func includeName(name string, patterns []string) (bool, error) { |
This file contains 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 <stdarg.h> | |
#include <string.h> | |
#include <dirent.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
int min_example(const struct dirent *ent, char *string) | |
{ | |
static const char *s = NULL; | |
if(string) { |
This file contains 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> | |
#include <unistd.h> | |
#include <sys/wait.h> | |
#include <sys/times.h> | |
double run(char *arg[]) | |
{ | |
pid_t pid = fork(); | |
if(pid == 0) { | |
execvp(arg[0], arg); |
This file contains 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 <iostream> | |
#include <string> | |
#include <algorithm> | |
#include <vector> | |
#include <random> | |
class widget { | |
private: | |
int feet; | |
int inches; |