This file contains hidden or 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
$ python3 ./hej.py | |
Hello Pelle! | |
Hello Pelle! | |
Hello Kalle! | |
Hello Kalle! |
This file contains hidden or 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
using System.Linq; | |
using System.Collections.Generic; | |
using System; | |
public class UniqueRandom { | |
private HashSet<int> intSet = new HashSet<int>(); | |
private Random rng; | |
public UniqueRandom(Random rng) { | |
this.rng = rng; |
This file contains hidden or 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
// In the following pipeline the stages that start with 'Build: ' needs to run | |
// on the same node and in the same workspace, the same is true for the stages | |
// that begin with 'Test: ' | |
// Will this be the case as the pipeline is written? | |
// If not, can I force the pipeline to do so? | |
pipeline { | |
options { | |
skipDefaultCheckout() | |
} |
This file contains hidden or 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 | |
function _help-flag() { | |
[[ " ${@} " == *" --help "* ]] || [[ " ${@} " == *" -h "* ]] | |
} | |
if _help-flag "${@}" || [ $# -lt 3 ] ; then | |
echo "Usage: ${0} <STR1> <STR2> FILE..." | |
echo | |
echo "Rename a bunch of files by replacing STR1 with STR2 in their filename." |
This file contains hidden or 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
[ | |
{ | |
"command": [ | |
"/bin/sh", | |
"-c", | |
"fail=; \\\nif (target_option=k; case ${target_option-} in ?) ;; *) echo \"am__make_running_with_option: internal error: invalid\" \"target option '${target_option-}' specified\" >&2; exit 1;; esac; has_opt=no; sane_makeflags=$MAKEFLAGS; if { if test -z '0'; then false; elif test -n 'x86_64-redhat-linux-gnu'; then true; elif test -n '4.1' && test -n '/home/mattiasb/Code/gnome/build/libchamplain'; then true; else false; fi; }; then sane_makeflags=$MFLAGS; else case $MAKEFLAGS in *\\\\[\\ \\\t]*) bs=\\\\; sane_makeflags=`printf '%s\\n' \"$MAKEFLAGS\" | sed \"s/$bs$bs[$bs $bs\t]*//g\"`;; esac; fi; skip_next=no; strip_trailopt () { flg=`printf '%s\\n' \"$flg\" | sed \"s/$1.*$//\"`; }; for flg in $sane_makeflags; do test $skip_next = yes && { skip_next=no; continue; }; case $flg in *=*|--*) continue;; -*I) strip_trailopt 'I'; skip_next=yes;; -*I?*) strip_trailopt 'I';; -*O) strip_trailopt 'O'; skip_next=yes;; -*O?*) strip_trailopt |
This file contains hidden or 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
bd = "!f() { git for-each-ref --sort=committerdate refs/heads/ --format='%(refname:short):%(committerdate:relative)'; }; f | column -t -s ':'" |
This file contains hidden or 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 ⓒ 2015 Mattias Bengtsson | |
# | |
# git-spindle is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# git-spindle is distributed in the hope that it will be useful, |
This file contains hidden or 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
--[[ | |
* Copyright (C) 2015 Mattias Bengtsson | |
* | |
* Contact: Mattias Bengtsson <[email protected]> | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public License | |
* as published by the Free Software Foundation; version 2.1 of | |
* the License, or (at your option) any later version. | |
* |
This file contains hidden or 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
mattiasb Is it possible to put your own custom classes inside | |
gtkbuilder ui-files? Or do you need to do work on the | |
gtkbuilder side for that to work? | |
baedert you mean custom widgets? | |
mattiasb And if it works: does it also work for, say, gjs? | |
mattiasb baedert: ah, yeah exactly | |
xjuan mattiasb, yes you can | |
xjuan what I do not remember is if you need to have your | |
class referenced or not | |
mattiasb What I'm after is to have a main-window.ui file be a |
This file contains hidden or 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 9f923390a77e9d5b950f100e2194c4b084a2a0bb Mon Sep 17 00:00:00 2001 | |
From: Mattias Bengtsson <[email protected]> | |
Date: Tue, 28 Oct 2014 00:48:27 +0100 | |
Subject: [PATCH] WIP: Template of layers-popover | |
--- | |
src/layers-popover.ui | 93 +++++++++++++++++++++++++++------------------------ | |
src/layersPopover.js | 21 +++++++----- | |
2 files changed, 62 insertions(+), 52 deletions(-) |