Skip to content

Instantly share code, notes, and snippets.

View flexd's full-sized avatar

Kristoffer Berdal flexd

  • Oslo, Norway
  • 17:19 (UTC +02:00)
View GitHub Profile
<html>
<head></head>
<body>
<form name="form1" method="post" action="legginnavd.php">
<table width="100%" border="0">
<tr>
<td>DEPT NO:</td>
<td><input type="text" name="DEPTNO"></td>
</tr>
<html>
<head></head>
<body>
<?php
mysql_connect("localhost","kristoffer","dbpass") or die("Kan ikke koble til db");
mysql_select_db("kristoffer") or die("Kan ikke koble til");
?>
<table width="50%" border="1"><tr><td>ENAME</td><td>JOB</td><td>DEPT</td><td>LOC</td></tr>
<?php
$sql= "select ENAME, JOB, DNAME, LOC from EMP AS E, DEPT AS D WHERE E.DEPTNO = D.DEPTNO";
<html>
<head></head>
<body>
<?php
mysql_connect("localhost","kristoffer","dbpass") or die("Kan ikke koble til db");
mysql_select_db("kristoffer") or die("Kan ikke koble til");
?>
<table width="50%" border="1"><tr><td>Navn</td><td>Alder</td></tr>
<?php
$sql= "select * from person" ;
<html>
<head></head>
<body>
<?php
mysql_connect("localhost","kristoffer","dbpass") or die("Kan ikke koble til db");
mysql_select_db("kristoffer") or die("Kan ikke koble til");
?>
<table width="50%" border="1"><tr><td>Navn</td><td>Alder</td></tr>
<?php
$sql= "select * from person" ;
#!/usr/bin/env ruby
require 'cinch'
require 'cinch/storage/redis'
class Memo
class MemoStruct < Struct.new(:user, :channel, :text, :time)
def to_s
"[#{time.asctime}] <#{channel}/#{user}> #{text}"
end
require "cinch/storage"
require "redis"
require "json"
module Cinch
class Storage
class Redis < Storage
def initialize(options, plugin)
# New Redis object, thread safe by default since 2.2.0
@redis = ::Redis.new(:host => 'localhost', :port => 6379)
require "cinch/storage"
require "redis"
require "json"
module Cinch
class Storage
class Redis < Storage
def initialize(options, plugin)
# New Redis object, thread safe by default since 2.2.0
@redis = ::Redis.new(:host => 'localhost', :port => 6379)
require "cinch/storage"
require "redis"
require "json"
module Cinch
class Storage
class Redis < Storage
def initialize(options, plugin)
# New Redis object, thread safe by default since 2.2.0
@redis = ::Redis.new(:host => 'localhost', :port => 6379)
#
# weechat.conf -- weechat v0.3.0
#
[debug]
[startup]
command_after_plugins = ""
command_before_plugins = ""
display_logo = on
require "cinch/storage"
require "redis"
module Cinch
class Storage
class Redis < Storage
def initialize(options, plugin)
# New Redis object, thread safe by default since 2.2.0
@redis = Redis.new
@options = options