Skip to content

Instantly share code, notes, and snippets.

View zygm0nt's full-sized avatar
🥑
AFK

Marcin Cylke zygm0nt

🥑
AFK
View GitHub Profile
@vivekgalatage
vivekgalatage / Note Taking.md
Last active April 5, 2024 08:52
Note Taking details
@transientlunatic
transientlunatic / hexmap.tex
Last active April 29, 2021 20:56
Hexagons for map-making in the Traveller RPG
%
% x=3*(minimum size)/2
% x=\sqrt{3/4}*(minimum size)/2
%
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{calc}
\def\hexdia{1cm}
@rkrzr
rkrzr / auto_tags.py
Last active April 10, 2024 11:14
Automatically generate ansible tags of the same name for each role in a playbook
"""
This module implements an Ansible plugin that is triggered at the start of a playbook.
The plugin dynamically generates a tag for each role. Each tag has the same name as its role.
The advantage of this is that it saves you some boilerplate, because you don't have to wrap
all tasks of a role in an additional block and assign a tag to that.
Additionally, it works automatically when you add new roles to your playbook.
Usage is exactly the same as without this plugin:
@serdroid
serdroid / gist:7bd7e171681aa17109e3f350abe97817
Created October 17, 2017 12:24
create commit and push to repo during CI build in gitlab
- generate ssh key for gitlab-runner user
- add ssh key to project's deploy keys (project/setting/repository)
add below commands into script section of .gitlab-ci.yml file.
# CI_REPOSITORY_URL contains gitlab-ci-token. replace start of the string up to '@' with git@' and append a ':' before first '/'
# example
# CI_REPOSITORY_URL=https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@example.com/gitlab-examples/ci-debug-trace.git
# should be git@example.com:/gitlab-examples/ci-debug-trace.git
- export PUSH_REPO=$(echo "$CI_REPOSITORY_URL" | sed -e "s|.*@\(.*\)|git@\1|" -e "s|/|:/|" )
@rjurney
rjurney / apply.py
Created December 21, 2016 21:23
Plot a pyspark.RDD.histogram as a pyplot histogram (via bar)
%matplotlib inline
buckets = [-87.0, -15, 0, 30, 120]
rdd_histogram_data = ml_bucketized_features\
.select("ArrDelay")\
.rdd\
.flatMap(lambda x: x)\
.histogram(buckets)
create_hist(rdd_histogram_data)
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@Kornel
Kornel / recursive-cowsay.sh
Last active February 4, 2016 14:18
Recursive cowsay inception - random cow at every step
#!/usr/bin/env bash
COWS_PATH="/usr/local/share/cows"
COW_FILES=($(ls $COWS_PATH))
COWS=${#COW_FILES[@]}
rand_cow() {
#RAND_IDX=$(($RANDOM % $COWS))
RAND_IDX=$((`od -vAn -N4 -tu4 < /dev/urandom` % $COWS))
package spray.testkit
import org.specs2.execute.{ Failure, FailureException }
import org.specs2.specification.core.{ Fragments, SpecificationStructure }
import org.specs2.specification.create.DefaultFragmentFactory
trait Specs2Interface extends TestFrameworkInterface with SpecificationStructure {
def failTest(msg: String) = {
val trace = new Exception().getStackTrace.toList
@max-mapper
max-mapper / readme.md
Last active May 14, 2022 09:12
list of interdisciplinary open source conferences

Interdisciplinary Open Source Community Conferences

Criteria

  • Must be an event that someone involved in open source would be interested in attending
  • Must be a community oriented event (no corporate owned for-profit events here please)
  • Can't be about a specific language/framework.

Leave suggestions in the comments below