Skip to content

Instantly share code, notes, and snippets.

/**
* Execute the following T-SQL scripts in Microsoft SQL Server Management Studio (SSMS)
* Query Editor to demonstrate T-SQL CONVERT and CAST functions in transforming string SQL
* date formats, string time & string datetime data to datetime data type. Practical examples
* for T-SQL DATE / DATETIME functions.
* source: http://www.sqlusa.com/bestpractices/datetimeconversion/
*/
-- SQL Server string to date / datetime conversion - datetime string format sql server
-- MSSQL string to datetime conversion - convert char to date - convert varchar to date
#!/bin/bash
NOCOLOR='\e[0m'
REDCOLOR='\e[37;41m'
function usage {
code=${1:-0}
echo "Usage: $0 [-h] [-p] [-r] [-f] [-c] [-d css|js|f|b] [-e dev|prod] [project_name]
where:
@thoroc
thoroc / main.go
Last active August 29, 2015 14:15
codingame - Skynet: the Chasm
package main
import (
"fmt"
"os"
"strconv"
)
type Bike struct {
// speed of the bike
@thoroc
thoroc / main.go
Created February 16, 2015 23:36
codingame - Power of Thor
package main
import (
"fmt"
"bytes"
"os"
"strconv"
)
func main() {
@thoroc
thoroc / main.go
Created February 16, 2015 23:38
codingame - the Descent
package main
import "fmt"
import "os"
func main() {
for {
var SX, SY int
fmt.Scan(&SX, &SY)
var MAX int
@thoroc
thoroc / main.go
Created February 17, 2015 02:57
codingame - Mars Lander - Level 1
package main
import (
"fmt"
"strconv"
//"os"
)
type Point struct {
X, Y int
@thoroc
thoroc / main.go
Last active August 29, 2015 14:15
codingame - Temperature
package main
import (
"fmt"
"os"
"bufio"
"strconv"
)
func main() {
@thoroc
thoroc / main.go
Last active August 29, 2015 14:15
codingame - ascii art
// does not pass the Lorem Ipsum test
package main
import (
"fmt"
"os"
"bufio"
"strconv"
"strings"
@thoroc
thoroc / getdate.bat
Created March 25, 2015 10:48
Auto MySQL Backup For Windows Servers By Matt Moeller
@ECHO off
SETLOCAL
IF [%1]==[] goto s_start
ECHO GETDATE.cmd
ECHO Returns the date independent of regional settings
ECHO Creates the environment variables %v_year% %v_month% %v_day%
ECHO.
ECHO SYNTAX
ECHO GETDATE
@thoroc
thoroc / readme.md
Created April 8, 2015 03:30
How I hacked into the Warface in-game protocol

How I hacked into the Warface in-game protocol

Disclaimer

This analysis of Warface in-game communication protocol is against multiple points of the Crytek Terms of Service. So... I am not responsible for any other people acts trying to reproduce what's shown here, and I discourage anyone not aware of the possible risks (permanent ban, account deletion, etc. ). Please do read the Crytek ToS before attempting to reproduce what's described here.

Update: Some of the exploits or remarks have already been fixed the time you read this. Indeed, while I was writing this document, I also raised the issues to Crytek devs and let them time to digest. I've kept them here in hope it will make good stories to tell. Sadly for them, the main content of this analysis still remains valid.

Summary