Skip to content

Instantly share code, notes, and snippets.

OGS is a safe place for people to learn and have fun. If you act with that spirit, we will have no problems.

  1. Play fairly. If you have lost, then lose gracefully. Cheating will not be tolerated.
  2. Hate speech of any kind, whether related to gender, race, or sexual preference will not be tolerated and may earn an immediate ban.
  3. Trash-talking between friends is positively encouraged, but bullying, harassment, or aggression will be met with sanctions.

Other than that, OGS is a free speech zone with the following caveats:

  • We would request that heated debates about politics and culture are kept in the off-topic room, and out of the main chat.
  • If your comments or profanity are offensive to other people, either change the subject or take the conversation private.
  • You may not spam advertisements for commercial activity or personal projects
Private Sub Command1_Click()
If Text1.Text = xCode Then
Unload Me
Form1.Show
Else
y = MsgBox("Incorrect", 17, "Access Denied")
If y = 1 Then Text1.Text = ""
End If
End Sub
@bobthemighty
bobthemighty / funky.fsx
Last active August 29, 2015 13:59
Funky num
module FunkyInt64 =
(* This is Thomas Wang's int64 hash function *)
let hash (k:int64) =
let k = uint64 k
let k = k |> (~~~) |> ((+) (k <<< 21))
let k = (k ^^^ (k >>> 24))
let k = (k + (k <<< 3 )) + (k <<< 8)
let k = k ^^^ (k >>> 14)
let k = k + (k <<< 2) + ( k <<< 4 )
using(var cn = new SqlConnection(MA_CONNECSHUNS))
using (var cmd = new SqlCommand(MA_QUERIES, cn))
{
cn.Open();
using (var reader = cmd.ExecuteReader())
while (reader.Read())
{
SqlXml xml = reader.GetSqlXml(1);
using (var xr = xml.CreateReader())
<!doctype html>
<html lang="en_GB" ng-app="ogs">
<head>
will_respond_with(
{
status: 200,
headers: {
'Content-Type': 'application/atom+xml'
},
schema: {
# this is the document we expect the mock server to return.
example: '<atom:entry>
<atom:title>Atom-Powered Robots Run Amok</atom:title>
@bobthemighty
bobthemighty / glossary.md
Last active August 29, 2015 14:17
DDD Glossary

Command

Commands encapsulate requests to DO something in the system. Each command uses the imperative tense ("CreateWidget", "MakeCustomerHappy", "UseTheForce"). A command is an immutable value object with no behaviour of its own. Commands are processed by Command Handlers. Each command must have exactly one command handler.

class CreateWidgetCommand
{
   function __construct($widgetColour, $widgetHeight, $widgetWidth){ ...}
 

Keybase proof

I hereby claim:

  • I am bobthemighty on github.
  • I am pathogenix (https://keybase.io/pathogenix) on keybase.
  • I have a public key whose fingerprint is 49CE FED3 0B35 4794 00CA 20C6 710A 1AA3 2A42 69F8

To claim this, I am signing this object:

module(load="imuxsock" SysSock.Use="on")
module(load="omhiredis")
input (type="imuxsock" Socket="/dev/log")
template(name="plain-syslog"
type="list") {
constant(value="{")
constant(value="\"@timestamp\":\"") property(name="timereported" dateFormat="rfc3339")
def doSomethingThatMightFail():
attempts = 0
success = False
retry = True
while retry and not success:
success = call_the_service()
if attempts ++ > MAX_ATTEMPTS: