Skip to content

Instantly share code, notes, and snippets.

🐒
trying to code his way out of it

Sebastian Gfeller sebug

🐒
trying to code his way out of it
Block or report user

Report or block sebug

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 Notes update Android Oreo
https://www.nuget.org/packages/SQLite.Net.Platform.XamarinAndroidN/
Install-Package SQLite.Net.Platform.XamarinAndroidN -Version 3.1.1
Because libsqlite.so no longer works
View container-instances-sample.md

Sample ASP.NET Core app

This is a small, container-ready version of an API consumer

export API_CONSUMER_BaseUrl=...
export API_CONSUMER_ExternalApplicationCode=...
export API_CONSUMER_PreSharedKey=...
export API_CONSUMER_EventCode=...

You can run the container locally to test:

View Get-LatestEmail.ps1
Add-Type -AssemblyName "Microsoft.Office.Interop.Outlook"
$outlook = New-Object -ComObject Outlook.Application
$namespace = $outlook.GetNamespace("MAPI")
$inbox = $namespace.GetDefaultFolder([Microsoft.Office.Interop.Outlook.OlDefaultFolders]::olFolderInbox)
$inbox.Items($inbox.Items.Count)
@sebug
sebug / Dockerfile
Created Jan 5, 2018
Pass connection string via docker -e to Entity Framework Core
View Dockerfile
FROM microsoft/aspnetcore-build:2.0.4-2.1.3-nanoserver-sac2016 AS build-env
WORKDIR /app
COPY *.sln ./
RUN mkdir Sample
COPY Sample/*.csproj ./Sample/
RUN dotnet restore
# Copy everything else and build
COPY . ./
View Dockerfile
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
curl \
firefox \
python2.7 \
python-pip \
&& pip install selenium
RUN curl -L -O "https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-linux64.tar.gz" && tar zxf geckodriver-v0.19.1-linux64.tar.gz
View test_webkit.py
from selenium.webdriver.common.by import By
from selenium import webdriver
import unittest
import time
class WebKitFeatureStatusTest(unittest.TestCase):
def test_feature_status_page_search(self):
self.driver.get("https://webkit.org/status/")
View sample_two_iis_try_two.yaml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: sampleback
spec:
replicas: 1
template:
metadata:
labels:
app: sampleback
View sample_two_iis.yaml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: sampleback
spec:
replicas: 1
template:
metadata:
labels:
app: sampleback
View setup.py
#!/usr/local/bin/python
from subprocess import call
from subprocess import Popen
from subprocess import PIPE
import re
import winrm
import sys
import time
settings = {
@sebug
sebug / SmartArt.purs
Created Jul 8, 2016
Canvas schematic arrows
View SmartArt.purs
module SmartArt where
import Prelude (bind, ($), (+), (*), (-), (/), pure)
import Control.Monad.Eff (Eff)
import Graphics.Canvas (CANVAS, fillPath, setFillStyle, moveTo, lineTo, fillText, setFont, measureText, Context2D)
import Data.List (List(..))
drawArrows :: forall eff. Context2D -> Number -> Number -> Number -> List String -> Eff (canvas :: CANVAS | eff) Number
drawArrows ctx dx x y Nil = pure x
drawArrows ctx dx x y (Cons l ls) = do
You can’t perform that action at this time.