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
// ==UserScript== | |
// @name patch carbon dashboard | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Bastien Durel | |
// @match https://carbon.geekwu.org/dashboard | |
// @icon https://www.google.com/s2/favicons?domain=geekwu.org | |
// @grant none | |
// ==/UserScript== |
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
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
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
SRC=main.cpp | |
OBJ=$(SRC:.cpp=.o) | |
OPT=-g -O2 | |
ifneq ($(THREADS),) | |
OPT+=-DNUM_THREADS=$(THREADS) | |
endif | |
ifeq ($(WORK),1) | |
OPT+=-DWORK |
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
SRCC=client.cpp | |
SRCS=server.cpp | |
OBJC=$(SRCC:.cpp=.o) | |
OBJS=$(SRCS:.cpp=.o) | |
ifneq ($(NOKEEPALIVE),1) | |
KA=-DDOKEEPALIVE=1 | |
endif | |
OPT=-g -O2 |
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/perl | |
use strict; | |
use warnings; | |
use DBI qw(:sql_types); | |
use DBD::Oracle qw(:ora_session_modes); | |
my $run = 1; | |
$SIG{INT} = sub { $run = 0; print "Stopping ...\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/perl | |
use strict; | |
use threads; | |
use Proc::Daemon; | |
sub do_nothing { | |
sleep 1 while 1; | |
} | |
threads->create(\&do_nothing); |
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/perl -CSD | |
use strict; | |
use warnings; | |
use Gtk3 -init; | |
use Gtk3::WebKit qw(:xpath_results :node_types); | |
use Data::Dumper; | |
use Carp; | |
$SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; |