Skip to content

Instantly share code, notes, and snippets.

View jwendell's full-sized avatar

Jonh Wendell jwendell

View GitHub Profile
@jwendell
jwendell / get-avatar.js
Created April 1, 2016 16:04
getting an avatar url from github (run with 'gjs' interpreter)
const Soup = imports.gi.Soup;
const Mainloop = imports.mainloop;
let _httpSession = new Soup.Session({user_agent: 'curl/7.43.0'});
let url = 'https://api.github.com/users/jwendell';
let message = new Soup.Message({method: 'GET', uri: new Soup.URI(url)});
_httpSession.queue_message(message, function(session, message) {
if (message.status_code != Soup.KnownStatusCode.OK) {
log('Error: ' + message.status_code.toString());
import websocket
try:
import thread
except ImportError: # TODO use Threading instead of _thread in python3
import _thread as thread
import time
import sys
import ssl
@jwendell
jwendell / clement.sh
Created October 26, 2016 11:58
Find Clement Lefebvre contributions within GNOME
#!/bin/bash
AUTHOR="Clement Lefebvre"
for repo in *; do
if [ -d "$repo" ]; then
# echo "entering $repo"
cd "$repo"
contribs=$(git log --pretty=format:"%an" 2>/dev/null | grep "$AUTHOR" | wc -l)
if [ "$contribs" != "0" ]; then
@jwendell
jwendell / sed1.go
Created February 8, 2017 22:16
script to run sed into some files, written in go, for learning purposes
package main
import (
"bufio"
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
"strings"
#
# Allow users to read the istio config map
#
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
name: istio-configmap-viewer
namespace: istio-system
rules:
- resources: ["configmaps"]
@RunWith(ArquillianConditionalRunner.class)
@RequiresOpenshift
@Template(url = "https://gist.githubusercontent.com/lordofthejars/81cf2db55145873c9242719efe1c3f24/raw/27188fae3ebc1375f0645ac1a22cb3fe6980ca36/hello-template.yaml")
public class HelloWorldTemplateTest {
@Named("hello-openshift-service")
@PortForward
@ArquillianResource
URL url;
diff --git a/Makefile b/Makefile
index c42f3da5..c1447d6b 100644
--- a/Makefile
+++ b/Makefile
@@ -23,12 +23,13 @@ VERSION ?= "0.5.0"
# Make sure GOPATH is set based on the executing Makefile and workspace. Will override
# GOPATH from the env.
-export GOPATH= $(shell cd ../../..; pwd)
+GOPATH ?= $(shell cd ../../..; pwd)
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char const *argv[])
{
if (argc != 2) {
fprintf(stderr, "Usage: %s <MEM SIZE>\n", argv[0]);
return 1;
}
#!/bin/bash
if [ -z "${GATEWAY_URL}" ]; then
echo "Set the GATEWAY_URL variable first"
exit 1
fi
# $1: If non empty, simulates user logged in
# $2: If non empty, simulates a different source ip
function exec_curl() {

master:

$ istioctl version --short=false --remote=false
version.BuildInfo{Version:"d262f6b086bb67771e65132d0044adf9748a65ea-dirty", GitRevision:"d262f6b086bb67771e65132d0044adf9748a65ea-dirty", GolangVersion:"go1.13.3", BuildStatus:"Clean", GitTag:"1.2.0-rc.3-1261-gd262f6b08"}

$ istioctl manifest generate --set profile=minimal  --set values.istio_cni.HAHAHA=true 
bad path=value (values.istio_cni.HAHAHA=true): unknown field "HAHAHA" in v1alpha1.CNIConfig

1.4: