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> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| int xs[] = {7,62,2,46,73,43,26,82,5,95,57,56,44,21,40,79,13,6,9,8,72,59,65,81,60,78,13,85,87,58,48,25,32,47,67,4,31,19,33,1,92,14,53,89,84,54,29,10,17,3,77,70,45,97,34,23,86,55,15,64,68,83,76,41,18,39,94,22,74,11,69,49,12,35,20,90,100,98,36,63,91,38,66,93,50,96,61,71,75,37,52,88,30,28,99,27,42,51,80,24,16}; | |
| int main() | |
| { | |
| int x = 0; | |
| for (int i = 1; i <= 100; ++i) { |
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
| // $ cc -o checker checker.c | |
| // $ ./checker | |
| // $ ffmpeg -i output-%02d.ppm -r 60 output.mp4 | |
| #include <stdio.h> | |
| int main() | |
| { | |
| char buf[256]; | |
| for (int i = 0; i < 60; ++i) { | |
| snprintf(buf, sizeof(buf), "output-%02d.ppm", i); |
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> | |
| #include <stdlib.h> | |
| #define da_append(xs, x) \ | |
| do { \ | |
| if ((xs)->count >= (xs)->capacity) { \ | |
| if ((xs)->capacity == 0) (xs)->capacity = 256; \ | |
| else (xs)->capacity *= 2; \ | |
| (xs)->items = realloc((xs)->items, (xs)->capacity*sizeof(*(xs)->items)); \ | |
| } \ |
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
| // Copyright 2021 Alexey Kutepov <reximkut@gmail.com> | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining | |
| // a copy of this software and associated documentation files (the | |
| // "Software"), to deal in the Software without restriction, including | |
| // without limitation the rights to use, copy, modify, merge, publish, | |
| // distribute, sublicense, and/or sell copies of the Software, and to | |
| // permit persons to whom the Software is furnished to do so, subject to | |
| // the following conditions: | |
| // |
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
| // cc `pkg-config --cflags openssl` -o simple_openssl_client simple_openssl_client.c `pkg-config --libs openssl` | |
| // Copyright 2021 Alexey Kutepov <reximkut@gmail.com> | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining | |
| // a copy of this software and associated documentation files (the | |
| // "Software"), to deal in the Software without restriction, including | |
| // without limitation the rights to use, copy, modify, merge, publish, | |
| // distribute, sublicense, and/or sell copies of the Software, and to | |
| // permit persons to whom the Software is furnished to do so, subject to |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Copyright (c) 2014 Alexey Kutepov a.k.a. rexim | |
| # Permission is hereby granted, free of charge, to any person | |
| # obtaining a copy of this software and associated documentation files | |
| # (the "Software"), to deal in the Software without restriction, | |
| # including without limitation the rights to use, copy, modify, merge, | |
| # publish, distribute, sublicense, and/or sell copies of the Software, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| // cc -w -include time.h -o qlock qlock.c // MIT Copyright (c) Tsoding | |
| char*s="// cc -w -include time.h -o qlock qlock.c // MIT Copyright (c) Tsoding\n" | |
| "char*s=\"?\";x,y,d[8],i,dx;f[]={31599,19812,14479,31207,23524,29411,29679,\n" | |
| "30866,31727,31719,1040};char*so,*si;p(ch){i=x/2/(3+2);dx=x/2%(3+2);if(i<8&&(y-5)\n" | |
| "/2<5&&dx<3&&(f[d[i]]>>((5-(y-5)/2-1)*3+dx))&1)printf(\"\\033[1;41;30m%c\\033[0m\",ch\n" | |
| ");else printf(\"%c\",ch);if(ch=='\\n'){y+=1;x=0;}else x+=1;}gd(){time_t t=time(NULL);struct\n" | |
| " tm*tm=localtime(&t);d[0]=tm->tm_hour/10;d[1]=tm->tm_hour%10;d[2]=10;d[3]=tm->tm_min\n" | |
| "/10;d[4]=tm->tm_min%10;d[5]=10;d[6]=tm->tm_sec/10;d[7]=tm->tm_sec%10;}main(){for\n" | |
| "(gd();;printf(\"\\n\\033[%dA\\033[%dD\",y+1,x),sleep(1),gd())for(so=s,x=0,y=0;*so;so++\n" | |
| ")if(*so==63)for(si=s;*si;si++)switch(*si){case'\\n':p('\\\\');p('n');p('\"');p('\\n')\n" |
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
| #!/usr/bin/env python3 | |
| import random | |
| cs = "BCDFGHJKLMNPQRSTVWXZY" | |
| vs = "AEIOU" | |
| def generate_name(n=3): | |
| result = "" | |
| for i in range(n): |
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> | |
| #include "tb.h" | |
| int main() | |
| { | |
| TB_Arena a = {0}; | |
| tb_arena_create(&a, "ABOBA"); | |
| TB_Module* m = tb_module_create(TB_ARCH_X86_64, TB_SYSTEM_LINUX, false); | |
| printf("m = %p\n", m); |
NewerOlder