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
FROM golang:1.21-alpine as compiler | |
ARG DOCKER_GIT_CREDENTIALS_GITHUB | |
ENV CGO_ENABLED=0 | |
COPY . /tmp/src | |
WORKDIR /tmp/src | |
RUN apk --no-cache add git~=2 ca-certificates~=20230506 && \ |
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
terraform { | |
required_version = "~>1.3.6" | |
required_providers { | |
google = { | |
source = "hashicorp/google" | |
version = "~>4.84.0" | |
} | |
cloudflare = { |
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
### Keybase proof | |
I hereby claim: | |
* I am tobiassjosten on github. | |
* I am tobiassjosten (https://keybase.io/tobiassjosten) on keybase. | |
* I have a public key whose fingerprint is 67FB 1CB5 F063 77BB 6E3D B2CC F75C 1976 31F0 8B7C | |
To claim this, I am signing this object: |
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
-- http://sumedh.info/articles/importing-comments-disqus-xml-database.php | |
import Control.Monad | |
import Database.HDBC | |
import Database.HDBC.MySQL | |
main = | |
do conn <- connectMySQL defaultMySQLConnectInfo { | |
mysqlHost = "localhost", | |
mysqlDatabase = "tobiassjosten", |
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
# -*- coding: utf8 -*- | |
from planetwars import BaseBot, Game | |
from planetwars.player import NOBODY, ME, PLAYER2, PLAYER3, PLAYER4, ENEMIES | |
from planetwars.universe import Universe | |
from planetwars.planet import Planet | |
from copy import copy | |
from logging import getLogger | |
import math |
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
<?php | |
class Holder | |
{ | |
const myConstant = 'Stabil'; | |
} | |
class Wrapper | |
{ | |
public $holder; |
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
function addition(NumbersInterface $numbers) { | |
// We know for sure that we can access $numbers->number1, $numbers->number2 | |
// and $numbers->number2. This function can now do its one thing without | |
// being burdened with validation. | |
// http://en.wikipedia.org/wiki/Single_responsibility_principle | |
// http://en.wikipedia.org/wiki/Design_by_contract | |
} | |
interface NumbersInterface { | |
public $number1; |
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
<?php | |
namespace Smartburk\Bundle\MainBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity( | |
* repositoryClass="Smartburk\Bundle\MainBundle\Entity\SeriesRepository" | |
* ) |
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
(function(_gaq) { | |
var path = location.pathname, | |
languages = ['en', 'sv']; | |
// We want prefix == 'en|sv|etc' or null. | |
var prefix = path.match(/^\/([a-z]{2})(\/.+)?$/), | |
prefix = prefix ? prefix[1] : null; | |
if (prefix && languages.indexOf(prefix) >= 0) { | |
// If we are on '/en|sv|etc', fallback to '/'. |
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
# Configure colors, if available. | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
c_reset='\[\e[0m\]' | |
c_user='\[\e[0;32m\]' | |
c_path='\[\e[1;34m\]' | |
c_git_clean='\[\e[0;37m\]' | |
c_git_staged='\[\e[0;32m\]' | |
c_git_unstaged='\[\e[0;31m\]' | |
else | |
c_reset= |
NewerOlder