Skip to content

Instantly share code, notes, and snippets.

@vjeantet
vjeantet / expander.html
Last active May 22, 2019 21:26
html simple text panel expander
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-size: 14px;
font-weight: 400;
@vjeantet
vjeantet / jira_oauth.go
Created March 11, 2017 12:17 — forked from Lupus/jira_oauth.go
Example of using OAuth authentication with JIRA in Go
package main
import (
"crypto/x509"
"encoding/json"
"encoding/pem"
"fmt"
"net/http"
"net/url"
"os"
@vjeantet
vjeantet / gist:bbbbb39ca7ca4b48d4ff54d73cf2a667
Created March 6, 2017 22:01 — forked from lukecyca/gist:907c4a62758c068fd464
Impersonating a user with the JIRA API
"""
Example of making a request to JIRA as a trusted application.
In this example, we create a new issue as an arbitrary user.
More information on this technique at:
https://answers.atlassian.com/questions/247528/how-do-you-impersonate-a-user-with-jira-oauth
"""
import oauth2
import time
@vjeantet
vjeantet / gist:3fcaaac2a20b04a58843
Last active December 17, 2016 16:06
keybase.md
### Keybase proof
I hereby claim:
* I am vjeantet on github.
* I am vjeantet (https://keybase.io/vjeantet) on keybase.
* I have a public key whose fingerprint is CB5F 69BD 3CDD 2EE5 DEBC 06A6 BB90 9927 9BF3 AC6D
To claim this, I am signing this object:
@vjeantet
vjeantet / Ghost_to_HUGO_blog.php
Last active June 19, 2016 10:55
Use this php script to convert a Ghost export json file to Hugo content file. Files will be created in a "output" folder, to reuse images place the ghost content folder into the hugo's static folder
<?php
$ghost_data = json_decode(file_get_contents("./GhostData.json"),true) ;
foreach ($ghost_data['data']['posts'] as $key => $value) {
$created_at = date("c",$value["created_at"]/1000);
$title = str_replace('\\','\\\\',$value["title"]) ;
$title = str_replace('"','\"',$title) ;
package main
import (
"log"
"github.com/vjeantet/beacon"
)
func main() {
b, err := beacon.NewBeacon("87DD5976-9E6B-4EFF-A88F-17FF3BEF774D", 1, 1) // uuid, major, minor
@vjeantet
vjeantet / Named-Type-problem.go
Last active August 29, 2015 14:05
Named Type problem
package main
import (
"fmt"
)
type counter int
func main() {
var c counter