Skip to content

Instantly share code, notes, and snippets.

quantonganh

Block or report user

Report or block quantonganh

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
View csv.go
package main
import (
"encoding/csv"
"fmt"
"io"
"log"
"os"
"strconv"
)
View gulpfile.js
const gulp = require('gulp'),
util = require('gulp-util'),
notifier = require('node-notifier'),
child = require('child_process'),
os = require('os'),
path = require('path');
var server = 'null'
function build() {
@quantonganh
quantonganh / auth0-golang-jwt.md
Last active Sep 17, 2019
square/go-jose: error in cryptographic primitive
View auth0-golang-jwt.md

https://github.com/auth0-blog/auth0-golang-jwt/blob/master/main.go#L45

secret := []byte("{YOUR-AUTH0-API-SECRET}")
secretProvider := auth0.NewKeyProvider(secret)
audience := []string{"{YOUR-AUTH0-API-AUDIENCE}"}

configuration := auth0.NewConfiguration(secretProvider, audience, "https://{YOUR-AUTH0-DOMAIN}.auth0.com/", jose.HS256)
validator := auth0.NewValidator(configuration)
View dockerd.dump
Mar 28 03:58:19 hostname dockerd[2470]: time="2018-03-28T03:58:19Z" level=info msg="=== BEGIN goroutine stack dump ===
Mar 28 03:58:19 hostname dockerd[2470]: goroutine 28 [running]:
Mar 28 03:58:19 hostname dockerd[2470]: main.dumpStacks()
Mar 28 03:58:19 hostname dockerd[2470]: #011/go/src/github.com/containerd/containerd/cmd/containerd/main_unix.go:63 +0x8c
Mar 28 03:58:19 hostname dockerd[2470]: main.handleSignals.func1(0xc4201b2420, 0xc4201b23c0, 0x557560bfe540, 0xc4201c8f90, 0xc4201ba1e0)
Mar 28 03:58:19 hostname dockerd[2470]: #011/go/src/github.com/containerd/containerd/cmd/containerd/main_unix.go:38 +0x28b
Mar 28 03:58:19 hostname dockerd[2470]: created by main.handleSignals
Mar 28 03:58:19 hostname dockerd[2470]: #011/go/src/github.com/containerd/containerd/cmd/containerd/main_unix.go:28 +0x8b
Mar 28 03:58:19 hostname dockerd[2470]: goroutine 1 [chan receive, 6045 minutes]:
Mar 28 03:58:19 hostname dockerd[2470]: main.main.func1(0xc4201e0000, 0xc4201e0000, 0xc42004fb4f)
View omz-debug.log
This file has been truncated, but you can view the full file.
#
# Defines environment variables.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Ensure that a non-login, non-interactive shell has a defined environment.
if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
View VBox.log
VirtualBox VM 4.3.10_Ubuntu r93012 linux.amd64 (Apr 7 2014 03:37:47) release log
00:00:00.149293 Log opened 2016-02-24T06:45:40.396008000Z
00:00:00.149294 Build Type: release
00:00:00.149296 OS Product: Linux
00:00:00.149297 OS Release: 3.13.0-68-generic
00:00:00.149297 OS Version: #111-Ubuntu SMP Fri Nov 6 18:17:06 UTC 2015
00:00:00.149311 DMI Product Name: S1200RP
00:00:00.149314 DMI Product Version: ....................
00:00:00.149502 Host RAM: 32113MB total, 5992MB available
00:00:00.149504 Executable: /usr/lib/virtualbox/VBoxHeadless
View system.log
Sep 6 00:04:39 MacBook-Pro.local mds[98]: (Warning) Volume: vsd:0x7fba729a5000 Open failed. failureCount:10 {
DisabledRecycleCount = 10;
}
Sep 6 00:06:04 MacBook-Pro.local WindowServer[249]: _CGXSetWindowBackgroundBlurRadius: Invalid window 0xffffffff
Sep 6 00:06:04 MacBook-Pro.local loginwindow[101]: find_shared_window: WID -1
Sep 6 00:06:04 MacBook-Pro.local loginwindow[101]: CGSGetWindowTags: Invalid window 0xffffffff
Sep 6 00:06:04 MacBook-Pro.local loginwindow[101]: find_shared_window: WID -1
Sep 6 00:06:04 MacBook-Pro.local loginwindow[101]: CGSSetWindowTags: Invalid window 0xffffffff
Sep 6 00:06:04 MacBook-Pro kernel[0]: AppleCamIn::systemWakeCall - messageType = 0xE0000340
Sep 6 00:06:04 MacBook-Pro.local WindowServer[249]: device_generate_desktop_screenshot: authw 0x7fa6f95b5da0(2000), shield 0x7fa6f9608490(2001)
View uwsgi.log
May 11 04:42:41 u2 uwsgi: organization: root
May 11 04:42:41 u2 uwsgi: project: python
May 11 04:42:41 u2 uwsgi: branch: master
May 11 04:42:41 u2 uwsgi: tag: deploy_master
May 11 04:42:46 u2 uwsgi: payload: {"minionid": "MacBook-Pro.local", "name": "python", "target": "/Users/quanta/tmp/python", "url": "gitlab@q-git.robotinfra.c
om:root/python.git", "user": "quanta", "homepage": "https://q-git.robotinfra.com/root/python", "description": ""}
May 11 04:42:46 u2 sudo: root : TTY=unknown ; PWD=/etc/uwsgi/apps-enabled ; USER=root ; COMMAND=/usr/local/bin/salt_fire_event.py -p {"minionid": "MacBook
-Pro.local", "name": "python", "target": "/Users/quanta/tmp/python", "url": "gitlab@q-git.robotinfra.com:root/python.git", "user": "quanta", "homepage": "http
s://q-git.robotinfra.com/root/python", "description": ""} -t deploy_master
May 11 04:42:51 u2 uwsgi: TypeError
View gitlab_salt_event.py
#!/usr/bin/env python
import os
import json
import salt.client
import salt.syspaths as syspaths
def application(environ, start_response):
length = environ.get('CONTENT_LENGTH', '0')
View uwsgi.log
*** Operational MODE: single process ***
Traceback (most recent call last):
File "gitlab_salt_event.py", line 5, in <module>
import salt.client
ImportError: No module named salt.client
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 82683, cores: 1)
You can’t perform that action at this time.