Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Sven Anders Robbestad svenanders

View GitHub Profile
View public
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDkijMG0isGDySEhbWvVNzjbLSYNwzP2MoL9f4towJqVCIQz9gDpfHUe3HasRUQ4EPxOHpPZ3XrIhBQBGYC5KgoLsN6DMKxwObcigSHbMDbGe5Hw/yxAI1stU2hNN1nzm3/R6fXxoCpL0PCXmOJLSRsjjy+OCwIuKJdJWmkq+4FIluQWJwT3gSFE+gYW6UMjzXhZAUIsbNw4ifU+uzq1xqXVohbsSn70MeKKwKmkaAGQVUMl/YejyR9/ppGhnyOJKqICkRqvh/9G8L4jS5m/gUwttu5zR0Lvm04HygRsWUO9oOlHVPy11gMLF2VK/WQn1twz0HQadYDwDaqy8K9eNPF n634264@nrkmci69380.felles.ds.nrk.no
View pepper-changename.py
# -*- encoding: UTF-8 -*-
import qi as qi
import sys
import argparse
class RobotName(object):
def __init__(self, app):
"""
Initialisation of qi framework and event detection.
View player.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour
{
public float moveForce = 14f;
public float maxSpeed = 25f;
public float jumpForce = 0.5f;
[HideInInspector]
View app_manifest.json
{
"short_name": "My PWA",
"name": "My first Progressive Web App",
"description": "My first Progressive Web App is a very simple starter app",
"start_url": "./?utm_source=web_app_manifest",
View product.cs
using System;
using System.Linq;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var bestProduct = 0L;
View ra.json
GET /
POST /current-records/_search
{
"query": {
"match": {
"object.title.edgeCompletion": "morgen"
}
},
"_source": "object.title"
View ws.sh
#!/bin/bash
PORT=$(( 8000 + ( RANDOM % 1000 ) + 1 ))
echo http://localhost:$PORT
python -m SimpleHTTPServer $PORT
View cors2.sh
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Date: Wed, 20 Nov 2013 19:36:00 GMT
Connection: keep-alive
Access-Control-Allow-Origin: http://foo.client.no
[...payload...]
View cors1.sh
GET /ressurs/ HTTP/1.1
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36
Accept: */*
Referer: http://foo.client.no/
Origin: http://foo.client.no
View CORS-server.js
const express = require('express');
const port = process.env.PORT || 3666;
const app = express();
app.use(function (req, res, next) {
res.header(
"Access-Control-Allow-Origin", "http://www.foo.no"
);
res.header(
"Access-Control-Allow-Headers",
You can’t perform that action at this time.