Skip to content

Instantly share code, notes, and snippets.

View fabrik42's full-sized avatar

Christian Dewein fabrik42

View GitHub Profile
@fabrik42
fabrik42 / advent_of_code_template.rb
Last active December 1, 2022 19:13
Advent of Code Ruby Template
# frozen_string_literal: true
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'activesupport'
gem 'awesome_print'
gem 'rspec'
end
@fabrik42
fabrik42 / day01.rb
Created December 1, 2020 12:13
day01.rb
def input
DATA.read.split.map(&:to_i)
end
def calculate_twos(input)
input[0..-2].each do |a|
input[1..-1].each do |b|
if a + b == 2020
return a * b
end
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fabrik42
fabrik42 / team-filter-example.org
Created March 29, 2019 16:37
Team Org Example

Dev-Team

All Dev People

FirstLastTeamSlackMail
HanSoloFalcon@hanhan.solo
LukeSkywalkerJedi@lukeluke.skywalker
DarthVaderSith@darthdarth.vader
PrincessLeiaFalcon@leiaprincess.leia
@fabrik42
fabrik42 / dotspacemacs.el
Created February 27, 2019 18:35
My .spacemacs dotspacemacs/user-config
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration.
This is the place where most of your configurations should be done. Unless it is
explicitly specified that a variable should be set before a package is loaded,
you should place your code here."
(add-to-list 'load-path "~/dotfiles/spacemacs-config")
;;; my-dracula-theme.el --- My Dracula Theme
;; Copyright 2015-present, All rights reserved
;;
;; Code licensed under the MIT license
;; Author: film42
;; Version: 1.5.0
;; Package-Requires: ((emacs "24"))
;; URL: https://github.com/dracula/emacs

Org-mode

ORG_GRADLE_PROJECT_MYAPP_RELEASE_STORE_FILE=myapp-dev.keystore
ORG_GRADLE_PROJECT_MYAPP_RELEASE_KEY_ALIAS=myapp-alias
ORG_GRADLE_PROJECT_MYAPP_RELEASE_STORE_PASSWORD=**your-password**
ORG_GRADLE_PROJECT_MYAPP_RELEASE_KEY_PASSWORD=**your-password**
signingConfigs {
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile rootProject.file("app/" + project.findProperty('MYAPP_RELEASE_STORE_FILE') ?: "ANDROID_STORE_FILE_NOT_SET")
storePassword project.findProperty('MYAPP_RELEASE_STORE_PASSWORD') ?: "ANDROID_STORE_PASSWORD_NOT_SET"
keyAlias project.findProperty('MYAPP_RELEASE_KEY_ALIAS') ?: "ANDROID_KEY_ALIAS_NOT_SET"
keyPassword project.findProperty('MYAPP_RELEASE_KEY_PASSWORD') ?: "ANDROID_KEY_PASSWORD_NOT_SET"
}
}
}
@fabrik42
fabrik42 / build.gradle
Created May 17, 2018 20:43
apk signing medium
buildTypes {
release {
//...
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
signingConfig signingConfigs.release
} else {
println '-------------------------------------------------'
println 'The MYAPP_RELEASE_STORE_FILE property was not set!'
println 'This release will not be signed by gradle!'