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
// OpenGL Extension Exclusions - may be modified before building. | |
// | |
// Generated for Intel Open Source Technology Center, Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) | |
// OpenGL v3.0 Mesa 11.1.0 (git-525f3c2), using FreeGLUT v30000 | |
#define NO_GL_VERSION_4_5 | |
#define NO_GL_VERSION_4_4 | |
#define NO_GL_VERSION_4_3 | |
#define NO_GL_VERSION_4_2 | |
#define NO_GL_VERSION_4_1 |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use HTTP::Tiny; | |
use Getopt::Long 'GetOptions'; | |
use Encode qw(encode decode); | |
use Parallel::ForkManager; | |
use PerlIO::gzip; | |
use Selenium::Remote::Driver; | |
use Time::HiRes 'sleep'; |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
use Encode 'decode_utf8'; | |
my $app = shift or usage(); | |
bootstrap_app($app, @ARGV); | |
my $d = $app->dispatcher; | |
my $actions = get_actions($d); |
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
$ ./lox -d | |
Welcome to Lox version 0.01 | |
> var a = 7; print (a + 4); | |
1 1 VAR var | |
1 5 IDENTIFIER a | |
1 7 EQUAL = | |
1 9 NUMBER 7 | |
1 10 SEMICOLON ; | |
1 12 PRINT print | |
1 18 LEFT_PAREN ( |
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 <stdlib.h> | |
typedef struct List { | |
int n; | |
void *next; | |
} List; | |
List* ListNew (int n) { | |
List *l = malloc(sizeof(List)); |
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
// Generate Sierpiński's triangle | |
// 0********************************************************************2 | |
// ****** ****** ****** ****** ****** ******* ****** ****** | |
// ************ ************ ************ ************ | |
// ********* ********* ******** ********* | |
// ***** ****** ****** ****** | |
// ******************** ******************* | |
// **************** ******** ******** | |
// ***** **** ***** **** | |
// ********** *********** |
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
/* wchar.c - read a wide character with ncurses and print it on the screen | |
* gcc -Wall $(pkg-config --cflags ncursesw) -o wchar wchar.c $(pkg-config --libs ncursesw) | |
* ./wchar | |
*/ | |
#include <curses.h> | |
#include <locale.h> | |
int main(void) | |
{ | |
setlocale(LC_ALL, ""); |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Linux::Smaps; | |
sub print_memusage { | |
my $smaps = Linux::Smaps->new; | |
printf "% 6s % 9d % 9d KB % 9d KB\n", $_[0], $$, $smaps->rss, $smaps->pss; | |
} |
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
#!/bin/sh | |
grep '^Charging$' /sys/class/power_supply/BAT0/status >/dev/null |
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 try // https://github.com/dnmfarrell/try | |
import ( | |
"fmt" | |
"io" | |
"os" | |
) | |
// based on: | |
// https://go.googlesource.com/proposal/+/master/design/go2draft-error-handling-overview.md |