Skip to content

Instantly share code, notes, and snippets.

View tristanwagner's full-sized avatar
💭

Tristan WAGNER tristanwagner

💭
View GitHub Profile
@tristanwagner
tristanwagner / dbdump.py
Last active October 5, 2022 18:27
CSV list of items id and names Vanilla WoW 1.12.1 from https://github.com/LightsHope/database
# encoding=utf8
import sys
import csv
import mysql.connector
# Connect to MSSQL Server
try:
conn = mysql.connector.connect(host="", user="",password="", database="")
@tristanwagner
tristanwagner / dbdump.py
Last active December 22, 2017 01:41
CSV list of quest Vanilla WoW 1.12.1 from https://github.com/LightsHope/database
# encoding=utf8
# fichier permettant dexporter vers csv les item id et item name
import sys
import csv
import datetime
import mysql.connector
from decimal import Decimal
# Connect to MSSQL Server
@tristanwagner
tristanwagner / README-Template.md
Created September 23, 2018 00:26 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

const sha256 = require('sha256');
class Block {
constructor(index, timestamp, data, prevHash) {
this.index = index;
this.timestamp = timestamp;
this.data = data;
this.prevHash = prevHash;
this.thisHash = sha256(
this.index + this.timestamp + this.data + this.prevHash
@tristanwagner
tristanwagner / yamlize.js
Created September 23, 2018 00:46 — forked from scripting/yamlize.js
Convert between YAML and JSON and vice versa
const utils = require ("daveutils");
const yaml = require ("js-yaml");
function yamlIze (jsontext) {
var jstruct = JSON.parse (jsontext);
const delimiter = "---\n";
var text = jstruct.text;
delete jstruct.text;
var s = delimiter + yaml.safeDump (jstruct) + delimiter + text;
@tristanwagner
tristanwagner / curl.md
Created May 24, 2019 14:56 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.