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/bash | |
# | |
# This file echoes a bunch of color codes to the terminal to demonstrate | |
# what's available. Each line is the color code of one forground color, | |
# out of 17 (default + 16 escapes), followed by a test use of that color | |
# on all nine background colors (default + 8 escapes). | |
# | |
T='gYw' # The test text | |
echo -e "\n 40m 41m 42m 43m 44m 45m 46m 47m"; | |
for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' ' 36m' '1;36m' ' 37m' '1;37m'; |
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
logic.script "API_LoadNavigationData('Resources/missions/LV_Karhad_PvE_Caravanserai_Navigation.json')" | |
logic.script "for i = 0, 30 do API_SpawnBot({x=1,y=1,z=1},0,'TaurusRPG',-1) end" |
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
// generated by quake, do not modify | |
unbindall | |
bind TAB "+scores" | |
bind ENTER "+button2" | |
bind ESCAPE "togglemenu" | |
bind SPACE "+moveup" | |
bind + "sizeup" | |
bind - "sizedown" | |
bind / "weapnext" | |
bind 0 "weapon 10" |
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
#pragma once | |
// https://yeun.github.io/open-color/ | |
enum oc_names { | |
oc_gray, | |
oc_red, | |
oc_pink, | |
oc_grape, | |
oc_violet, |
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 ?= cc | |
CFLAGS ?= -Wall -Wextra -std=c11 -O3 | |
BINDIR = bin | |
OUTNAME = lz | |
SOURCES = lz.c | |
OBJECTS = $(SOURCES:%.c=$(BINDIR)/%.o) | |
export V := false | |
export CMD_PREFIX := @ |
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 <arpa/inet.h> | |
#include <netdb.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
int main(int argc, char **argv) { |
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
from __future__ import print_function | |
import sys | |
class Calculator(object): | |
"""A simple calculator class.""" | |
def double(self, number): | |
return 2 * number | |
if __name__ == '__main__': |
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
int d = 42; | |
int o = 052; | |
int foo = 2321312; | |
int x = 0xdead'beef; | |
int X = 0Xc0'0f'fe; | |
int y = 0XBAD'cab1e; | |
int Y = 0Xc0'0f'fe; | |
int b = 0b101010; // C++14 | |
unsigned long long l1 = 18446744073709550592ull; // C++11 | |
unsigned long long l2 = 18'446'744'073'709'550'592llu; // C++14 |
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 | |
CATEGORIES="buildings food nature people technology objects" | |
DESTDIR=~/Pictures/unsplash | |
RESOLUTION=$(system_profiler SPDisplaysDataType | grep Resolution | sed 's/[^x0-9]//g') | |
for CATEGORY in ${CATEGORIES}; do | |
URL=https://source.unsplash.com/category/${CATEGORY}/${RESOLUTION}/daily | |
IMAGE=$(curl --silent --fail --location --write-out "%{url_effective}" --output /dev/null --url ${URL}) | |
NAME=${IMAGE##*/} |
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
// clang mouse-click.c -o mouse-click -framework ApplicationServices | |
#include <ApplicationServices/ApplicationServices.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) | |
{ | |
if (argc != 3) | |
{ | |
fprintf(stderr, "usage: %s [seconds to wait] [number of clicks]\n", argv[0]); |
NewerOlder