View create_blog.sql
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
CREATE TABLE posts ( | |
id BIGINT NOT NULL PRIMARY KEY, | |
name VARCHAR(255), | |
title VARCHAR(255), | |
content VARCHAR(255), | |
timestamps timestamp | |
); | |
CREATE GENERATOR POSTS_SEQ; |
View daemon.rb
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 jruby | |
# | |
# | |
require 'rubygems' | |
require 'spoon' | |
EXEC = '/tmp/exec.rb' | |
PID_PATH = '/tmp/exec.pid' | |
WORK_PATH = '/tmp/' |
View file_content_type.rb
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 ruby | |
# gem install ruby-filemagic | |
# please note that this program works only on Unix based systems and Linux. | |
# It uses the "file command" library (and information) in a native code to validate file content (rather then extension). | |
# Important note: It only read the *header* of the files rather the whole, content so we might still have malicious content ... :( | |
require 'rubygems' | |
require 'filemagic' |
View test_of_labels.pas
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
{$IFDEF FPC}{$GOTO ON}{$asmmode att}{$ENDIF} | |
program asm_code; | |
label a_label; | |
label _end; | |
var i : integer; | |
begin | |
writeln('a_label address: ', HexStr(PtrUInt(@a_label), 32)); | |
i := -10; |
View cli output
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
ldconfig: File /usr/lib/libsolidcontrolnm09ifaces.so.4.6.0 is empty, not checked. | |
ldconfig: File /usr/lib/libknmservice.so is empty, not checked. | |
ldconfig: File /usr/lib/libsolidcontrolnm09.so.4.6.0 is empty, not checked. | |
ldconfig: File /usr/lib/libknmservice.so.4 is empty, not checked. | |
ldconfig: File /usr/lib/libsolidcontrolnm09.so is empty, not checked. | |
ldconfig: File /usr/lib/libknmservice.so.4.6.0 is empty, not checked. | |
ldconfig: File /usr/lib/libsolidcontrolnm09.so.4 is empty, not checked. | |
ldconfig: File /usr/lib/libknminternals.so.4 is empty, not checked. | |
ldconfig: File /usr/lib/libsolidcontrolfuture.so is empty, not checked. | |
ldconfig: File /usr/lib/libknm_nm.so is empty, not checked. |
View watchdog.rb
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 ruby | |
require 'rubygems' | |
require 'mail' # gem install mail | |
require 'fileutils' # for 1.8 | |
BASE_PATH = '' # Place your path here for ahn | |
DEAMON = '' # Place the deamon path and name here | |
def send_email |
View archlinux signing
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
error: freeglut: signature from "Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>" is unknown trust | |
error: iproute2: signature from "Ionut Biru <ibiru@archlinux.org>" is unknown trust | |
error: lib32-kmod: signature from "Laurent Carlier <lordheavym@gmail.com>" is unknown trust | |
error: lib32-udev: signature from "Laurent Carlier <lordheavym@gmail.com>" is unknown trust | |
error: libgee: signature from "Ionut Biru <ibiru@archlinux.org>" is unknown trust | |
error: linux: signature from "Pierre Schmitz <pierre@archlinux.de>" is unknown trust | |
error: linux-headers: signature from "Pierre Schmitz <pierre@archlinux.de>" is unknown trust | |
error: sdl: signature from "Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>" is unknown trust | |
error: failed to commit transaction (invalid or corrupted package (PGP signature)) | |
Errors occurred, no packages were upgraded. |
View nested multibulk
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
1) 1) (integer) 0 | |
2) (integer) 1328734844 | |
3) (integer) 14 | |
4) 1) "CONFIG" | |
2) "SET" | |
3) "slowlog-log-slower-than" | |
4) "1" |
View is_internal_ip.rb
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
def internal_ip?(s) | |
s =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ | |
# based on http://www.ietf.org/rfc/rfc3330.txt | |
return case $1 | |
when '0', '10', '127' | |
true | |
when '169' | |
# link local Zero Conf | |
(('16'..'31').include? $2) || ($2.eql? '254') |
View dynamic_method.pas
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
{$mode objfpc}{$M+} | |
program test; | |
type | |
TMyClass = class | |
procedure SayHi; | |
end; | |
procedure TMyClass.SayHi; | |
begin |
OlderNewer