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 | |
set -e | |
if [[ "$1" == --help ]]; then | |
echo 'Usage:' >&2 | |
echo " $0 [KEYBOARD] [KEYMAP]" >&2 | |
exit 0 | |
fi |
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 hlt._ | |
import scala.collection.JavaConverters._ | |
object MyBot extends App { | |
val networking = new Networking | |
val gameMap = networking.initialize("ScalaBot") | |
def navHelp(ship: Ship, planet: Planet): Option[Move] = { | |
if (ship canDock planet) Some { |
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 org.junit.Assert._ | |
import org.junit.Test | |
class ExampleTestSuite { | |
@Test | |
def ok() { | |
assertTrue(true) | |
} |
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 | |
# Remove unused instances | |
dead_instances="$(docker ps -aq -f status=exited)" | |
[ "$dead_instances" ] && docker rm $dead_instances | |
# Remove unused images | |
dead_images="$(docker image ls | awk '/^<none> +<none>/ { print $3 }')" | |
[ "$dead_images" ] && docker rmi $dead_images |
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 | |
# | |
# Copyright (c) 2017 Nick Vrvilo | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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 | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $INSTALL_PREFIX/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=2.2 |
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
BEGIN:VCALENDAR | |
BEGIN:VEVENT | |
DTSTART;VALUE=DATE:20000728 | |
DTEND;VALUE=DATE:20000728 | |
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=7;BYDAY=-1FR | |
DESCRIPTION:https://en.wikipedia.org/wiki/System_Administrator_Appreciation_Day http://sysadminday.com/ | |
LOCATION: | |
SEQUENCE:0 | |
STATUS:CONFIRMED | |
SUMMARY:SysAdmin Appreciation Day |
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 | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $INSTALL_PREFIX/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=2.2 |
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
/** | |
* Link code against the correct versions of the jump*.S and make*.S files | |
* from https://github.com/boostorg/context/tree/develop/src/asm. | |
* | |
* These function prototypes are based on those in fcontext.hpp, at | |
* https://github.com/boostorg/context/blob/develop/include/boost/context, | |
* which includes the following copyright notice: | |
* | |
* Copyright Oliver Kowalke 2009. | |
* Distributed under the Boost Software License, Version 1.0. |
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
#include <assert.h> | |
#include <pthread.h> | |
#include <inttypes.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <unistd.h> | |
#define N 10 |
NewerOlder