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
| import random | |
| import sys | |
| import pygame | |
| from pygame.locals import * | |
| num = 0 | |
| def win(): | |
| pygame.display.set_mode((2048, 480)) |
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 perl | |
| use strict; | |
| use warnings; | |
| use 5.010; | |
| my $char = chr(int(rand(26) + 97)); | |
| open(my $fh, ">", "/proc/sysrq-trigger"); | |
| say $fh $char; | |
| close($fh); |
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
| static void check_if_need_to_close(struct cmd_data* cmd_data) { | |
| if (cmd_data->cmd_exited && cmd_data->in_closed && cmd_data->out_closed && cmd_data->err_closed) | |
| g_main_loop_quit(cmd_data->loop); | |
| } | |
| static void check_exit_status(GPid pid, gint status, gpointer user_data) { | |
| wsh_cmd_res_t* res = ((struct cmd_data*)user_data)->res; | |
| wsh_cmd_req_t* req = ((struct cmd_data*)user_data)->req; | |
| res->exit_status = WEXITSTATUS(status); |
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 perl | |
| use strict; | |
| use warnings; | |
| use v5.10; | |
| open(my $fh, $ARGV[0]) or die "$!"; | |
| foreach (<$fh>) { |
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
| Executing pretend actions: 14 of 73 | |
| systemd-200> /usr/libexec/paludis/utils/canonicalise: line 4: /usr/bin/readlink: No such file or directory | |
| systemd-200> is not a directory | |
| 45 of 73, 1 failed | |
| icedtea7-2.3.8> /usr/libexec/paludis/ebuild.bash: line 103: /usr/bin/dirname: Not a directory | |
| icedtea7-2.3.8> /usr/libexec/paludis/utils/canonicalise: line 4: /usr/bin/readlink: No such file or directory | |
| icedtea7-2.3.8> is not a directory | |
| 46 of 73, 2 failed |
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 perl | |
| use strict; | |
| use warnings; | |
| use v5.10; | |
| use JSON::Any; | |
| use LWP::UserAgent; | |
| use constant GITHUB_URI => "https://api.github.com/meta"; |
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
| (function() { | |
| function pokeAll() { | |
| var list = document.querySelectorAll("a[ajaxify*=pokeback]"); | |
| for (var i =0; i < list.length; i++) { | |
| list[i].click(); | |
| } | |
| } | |
| setInterval( pokeAll, 100 ); | |
| })(); |
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
| # Doesn't work | |
| gcc -shared -fPIC -DPIC -o .libs/libeventc.so.0.0 -pthread -std=gnu99 -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -D G_LOG_DOMAIN="libeventc" -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -g -O2 -Wl,--no-undefined -shared client/libeventc/src/.libs/libeventc_la-libeventc.o -Wl,-whole-archive /home/will/eventd/.libs/libeventd-evp.a -Wl,-no-whole-archive -L.libs -leventd-event -lgio-2.0 -lgmodule-2.0 -lz -lgthread-2.0 -lffi -lpcre -lgobject-2.0 -lglib-2.0 -lintl -liconv | |
| # Does work | |
| gcc -shared -fPIC -DPIC -o .libs/libeventc.so.0.0 -pthread -std=gnu99 -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -D G_LOG_DOMAIN="libeventc" -I/usr/local/include/gio-unix-2.0/ -I/usr/local |
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
| Index: Makefile | |
| =================================================================== | |
| RCS file: /cvs/ports/devel/metaauto/Makefile,v | |
| retrieving revision 1.17 | |
| diff -u -r1.17 Makefile | |
| --- Makefile 11 Mar 2013 10:50:11 -0000 1.17 | |
| +++ Makefile 7 May 2013 23:06:22 -0000 | |
| @@ -3,9 +3,10 @@ | |
| COMMENT = wrapper for gnu auto* | |
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
| my $mos = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]; | |
| my $now = localtime; | |
| my ($prev_month, $cur_month, $cur_day) = ($mos->[($now->mon() - 1) % 12], $mos->[$now->mon()], $now->mday()); | |
| map { print $out_fh $_ } grep { /(?:$cur_month|(?(?{$cur_day == 1})($prev_month)|$cur_month))\s+(?(1)(?:(?(?<=Feb\s)(?:28|29))30|31)|(?:$cur_day|(??{$cur_day - 1})))\b/ } <$in_fh>; |