$ sudo docker pull ubuntu
$ sudo docker run -t -i ubuntu:14.04 /bin/bash
root@856b6aa801af:/# apt-get update
Ign http://archive.ubuntu.com trusty InRelease
Ign http://archive.ubuntu.com trusty-updates InRelease
Ign http://archive.ubuntu.com trusty-security InRelease
Get:1 http://archive.ubuntu.com trusty Release.gpg [933 B]
Get:2 http://archive.ubuntu.com trusty-updates Release.gpg [933 B]
Get:3 http://archive.ubuntu.com trusty-security Release.gpg [933 B]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /usr/lib/pm-utils/sleep.d/45fix-usb-wakup | |
# Disable wakup from USB devices on Sony Vaio 1311s9rb | |
function print_state { | |
cat /proc/acpi/wakeup | grep $1 | cut -f3 | cut -d' ' -f1 | tr -d '*' | |
} | |
function disable_wakup { |
Ran on a laptop with 4 cores.
$ go version
go version go1.10.1 linux/amd64
$ go run cgo.go
panic: Iteration 39068207 - receive: "y" != "\x00"
goroutine 5 [running]:
main.main.func1()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gcc -Wall -S pow.c | |
$ wc -l pow.s | |
118139 pow.s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import textwrap | |
import sip | |
from PyQt5.QtQml import QQmlEngine, QQmlComponent | |
from PyQt5.QtWidgets import QApplication | |
from PyQt5.QtCore import QUrl | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import logging | |
import aiohttp | |
import backoff | |
@backoff.on_exception(backoff.expo, | |
aiohttp.errors.ClientError, | |
max_tries=8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project(eight_queens) | |
cmake_minimum_required(VERSION 2.8) | |
aux_source_directory(. SRC_LIST) | |
add_executable(${PROJECT_NAME} ${SRC_LIST}) |
Clone gist:
git clone https://gist.github.com/9f6e5b84050a31b1c4ef10e3a1d86f51.git single-file-buildbot-worker
cd single-file-buildbot-worker
Build with:
sudo docker run -ti -v ${PWD}:/src/ --rm python:2.7 /src/build.sh
If all went fine, generated single-file buildbot-worker
will be in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
info: | |
version: 1.0.0 | |
title: Sample for testing display of reponse models | |
description: | | |
It seems like display of response models in swagger-ui depends on how they're defined. | |
Particularly, whether they're referenced or in line. It should not matter. | |
basePath: /sample | |
produces: | |
- application/json |
NewerOlder