Skip to content

Instantly share code, notes, and snippets.

Nino treyssatvincent

Block or report user

Report or block treyssatvincent

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@treyssatvincent
treyssatvincent / testapi.php
Last active Jul 4, 2017
Faire fonctionner l'API sur Congressus ($config["discourse"]["api_key"] à ajouter dans les fichiers de config)
View testapi.php
<?php
include_once("header.php");
require_once("engine/discourse/DiscourseAPI.php");
$apiUser = "USERNAME";
$mailUser = "MAIL";
$discourseApi = new richp10\discourseAPI\DiscourseAPI("discourse.partipirate.org", $config["discourse"]["api_key"], "https");
// Tests :
@treyssatvincent
treyssatvincent / csv_to_rb.py
Created Jun 12, 2017
convert csv to rb database
View csv_to_rb.py
import csv
with open('input.csv') as f:
fieldnames = ('tag', 'label', 'description', 'user_id')
r = csv.DictReader(f, fieldnames, delimiter='|')
next(f, None) # skip header
rows = []
k = 0
for row in r:
txt = "Issue.create(tag:'" + row['tag'] + "', label:'" + row['label'] + "', description:'" + row['description'] + "' , user_id:'1')"
with open("output.rb", "a") as output_file:
View keybase.md

Keybase proof

I hereby claim:

  • I am treyssatvincent on github.
  • I am treyssatvincent (https://keybase.io/treyssatvincent) on keybase.
  • I have a public key ASAlXb11NRdjzigBiXsVX_MBtgV-ja57nCSqawyau60mkQo

To claim this, I am signing this object:

@treyssatvincent
treyssatvincent / gray.sh
Last active Dec 28, 2016
black and white a lot of pictures (jpg, jpeg, png)
View gray.sh
clean_extensionjpg(){
mmv \*.[Jj][Pp][Gg] \#1.jpg
mmv \*.[Jj][Pp][Ee][Gg] \#1.jpg
}
clean_extensionpng(){
mmv -v \*.[Pp][Nn][Gg] \#1.png
}
clean_extension(){
clean_extensionpng
clean_extensionjpg
You can’t perform that action at this time.