Skip to content

Instantly share code, notes, and snippets.

View fincha's full-sized avatar

Alexander Frischbutter fincha

View GitHub Profile
@marcelblijleven
marcelblijleven / git diff comma separated files.sh
Created December 9, 2019 09:23
Comma separated files with git diff
git --no-pager diff --name-only develop | tr '\n' ',' | sed 's/\(.*\),/\1 /'
@leoheck
leoheck / fix-ubuntu-18.10-on-dell-xps-9570
Last active December 17, 2022 11:11
Fix Ubuntu 18.10 on Dell XPS 9570
#
# Run this from the Live USB.
#
#############################
# EDIT YOUR PARTITIONS HERE #
#############################
root_partition=/dev/nvm0n1p2
sudo mount ${root_partition} /mnt
@kishikawakatsumi
kishikawakatsumi / UIScrollView+UIPageControl.swift
Created April 29, 2018 15:21
UIScrollView + UIPageControl with RxSwift
import RxSwift
import RxCocoa
fileprivate extension Reactive where Base: UIScrollView {
fileprivate var currentPage: Observable<Int> {
return didEndDecelerating.map({
let pageWidth = self.base.frame.width
let page = floor((self.base.contentOffset.x - pageWidth / 2) / pageWidth) + 1
return Int(page)
})
@phi-lira
phi-lira / manifest.json
Last active October 28, 2021 05:10
Lightweight Pipeline package manager manifest
{
"registry": "https://staging-packages.unity.com",
"dependencies": {
"com.unity.render-pipelines.lightweight" : "2.0.0-preview"
}
}
@DanielSWolf
DanielSWolf / Program.cs
Last active October 30, 2024 13:57
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@cosmicmonster
cosmicmonster / ShuffleArray.cs
Last active June 25, 2024 09:16
Unity / C# code to shuffle an array using the Fisher-Yates Shuffle.
using UnityEngine;
using System.Collections;
public class ShuffleArray : MonoBehaviour {
// Public so you can fill the array in the inspector
public int[] scenarios;
void Start ()
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')