Skip to content

Instantly share code, notes, and snippets.

View itinance's full-sized avatar

Hagen Hübel itinance

View GitHub Profile
@konradzdunczyk
konradzdunczyk / gist:3c07012b68cf4cf2185945242e544a21
Last active January 31, 2024 10:59
How to install cocapods like a champ (or other ruby-based tools)

How to install cocapods like a champ (or other ruby-based tools)

I want to share with you how I manage my toolset as iOS developer. iOS development is based on 3rd party tools (like cocapods, fastlane) and those tools are, mostly, writen in ruby. So we need to take care of ruby environment if we want to our work be no problematic and efficiant.

First of all - default macOS ruby is shit. Just accept that. We need to replace it and the best way to do it is a tool like rbenv. Rbenv is not only tool for this job, but it's good to start.

Second - brew is an excellent tool but not everything need to be installed via it. I know, it's tempting to use only one package manager for everything but life is life and it's not perfect.

So if you have issues like this:

@mountbatt
mountbatt / ZOE-Widget.js
Last active May 5, 2024 18:58
Scriptable iOS widget that displays the status of your Renault ZOE (or Megane, Dacia Spring) on your iPhone and iPad.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: light-gray; icon-glyph: car;
// version 2024-04-19
// latest changes:
// new kameron api key
// added language strings so you can translate it by yourself!
// add your my-renault account data:
// let myRenaultUser = "user" // email
// Adapted from https://github.com/omgnetwork/plasma-contracts
// Licensed under Apache License 2.0
// SPDX-License-Identifier: Apache-2.0
export { Queue, insert, pop, min, defaultLessThanMemory, defaultLessThanStorage }
struct Queue<T> {
T[] heap;
function(T memory, T storage) internal view returns (bool) lessThanMemory;
function(T storage, T storage) internal view returns (bool) lessThanStorage;
@j05u3
j05u3 / lifecycle_aware_stream_builder.dart
Last active November 7, 2022 03:07
Lifecycle aware stream builder (flutter). Find more details on https://medium.com/p/a2ae7244af32
import 'dart:async';
import 'package:flutter/widgets.dart';
abstract class StreamBuilderBase<T, S> extends StatefulWidget {
/// Creates a [StreamBuilderBase] connected to the specified [stream].
const StreamBuilderBase({ Key key, this.stream }) : super(key: key);
/// The asynchronous computation to which this builder is currently connected,
@theSage21
theSage21 / mailer.py
Last active January 15, 2024 03:08
Sending Files to My Kindle From Arxiv
# encoding: utf-8
# Install: pipenv install requests bs4 --python 3
# Usage: python mailer.py https://arxiv.org/abs/1805.12076
# Always supply an arxiv ABS page!!!
import sys
import os
import smtplib
import requests
...
handleGestureTerminationRequest = (e: GestureEvent, s: GestureState) =>
this.props.shouldRelease(s);
handleGestureCapture = (e: GestureEvent, s: GestureState) =>
this.props.shouldCapture(s);
handleGestureMove = (e: GestureEvent, { dx }: GestureState) => {
const currentOffset: number =
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active May 23, 2024 15:25
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@radiovisual
radiovisual / .eslintrc
Last active October 30, 2021 11:55
React Native AirBnB ESLint Config
{
"parser": "babel-eslint",
"plugins": [
"react",
"react-native"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@bcremer
bcremer / README.md
Last active May 23, 2016 10:43
Let's Encrypt and Nginx

Let's Encrypt

Using the Let's Encrypt (certbot)[https://certbot.eff.org/] with the webroot plugin in nginx.

Installation

Install certbot on a regular user-account:

wget https://dl.eff.org/certbot-auto