Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tlvenn's full-sized avatar

Christian Meunier tlvenn

View GitHub Profile
mkfifo mylock.fifo
ETCDCTL_API=3 ./bin/etcdctl lock mylock >mylock.fifo &
pid=$!
if read lockname <mylock.fifo; then
echo holding lock with key $lockname
... do whatever ...
fi
kill $pid
wait $pid
@tlvenn
tlvenn / Fastfile
Created September 8, 2017 06:23 — forked from GoodMirek/Fastfile
Fastfile for Apple iOS build, resilient against Apple Developer Portal outages. Works with Xcode8.
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
@tlvenn
tlvenn / ios-bitrise.yml
Created September 12, 2017 01:52 — forked from PillowUnicorn/ios-bitrise.yml
Pillow's iOS bitrise.yml
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- BITRISE_PROJECT_PATH: ios/pro_mobile.xcodeproj
opts:
is_expand: false
- BITRISE_SCHEME: pro_mobile
opts:
@tlvenn
tlvenn / android_bitrise.yml
Created September 12, 2017 01:52 — forked from PillowUnicorn/android_bitrise.yml
Pillow's Android bitrise.yml
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: qa
workflow: qa
workflows:
_init_install:
steps:
- activate-ssh-key:
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: "*"
workflow: tests
workflows:
_tests_setup:
steps:
- activate-ssh-key: {}
@tlvenn
tlvenn / schema.ex
Created November 16, 2017 03:38 — forked from smoak/schema.ex
defmodule ApiWeb.Schema do
use Absinthe.Schema
import Absinthe.Resolution.Helpers
import_types Absinthe.Type.Custom
@desc "A user"
object :user do
field :id, non_null(:string)
@tlvenn
tlvenn / MutationUtils.js
Created March 19, 2018 14:51 — forked from sibelius/MutationUtils.js
Helper methods for Relay Modern updater
// @flow
import { ConnectionHandler } from 'relay-runtime';
import { isObject, isArray } from 'lodash/fp';
export function listRecordRemoveUpdater({ parentId, itemId, parentFieldName, store }) {
const parentProxy = store.get(parentId);
const items = parentProxy.getLinkedRecords(parentFieldName);
parentProxy.setLinkedRecords(items.filter(record => record._dataID !== itemId), parentFieldName);
}
@tlvenn
tlvenn / camphor.scss
Created May 5, 2020 15:03 — forked from bdno86/camphor.scss
camphor
$camphor300:'d09GMgABAAAAAQ5UABIAAAAEn0QAAQ3tAAEZmQAAAAAAAAAAAAAAAAAAAAAAAAAAG4SkahzOKgZgFotgAIosCCIJgnMRCAqLlgCKvTwBNgIkA5lwE4GnDguZdAAEIAW7bwcgDHJb0WS0WUXZkokWaBHx4wKbY7TigANIU/t980QCGzI/IkCsdbqJZwY1ZOgWDngIamw3I43435Dd+zJ1kNmKVp/DvXNAwaNm//////////////////+/NZkMZ5cAl0CpbZ3oiwloFA5GyIWNzOYVLt1bpXPX+pABI2fo5rMZpgVYIzYqgxt92ajECqUKh2G9gaOCVRC23VSRVypHfbvb7wYcwEM25WArF0esm1yKzDixrJRdcBGtcpBZTFbFbIl8LIU4gWOnEdSITqkoGrHWJ8ywn9eVFWWk3lC6m07qp1TXntHaWp6ekYHLrFoyzOXYiQnn2kWX2zqMaFBTca25vHKndPhJV66HRhQzL9lB3OT20KGTXuFHu62wm1qzoV/iTnaiLdc8o/D7B+1O94BrjSE3cia6U1A5XNp0kHmUj8IMBaeiGaiNJV7b1csb0bq8EWYo2h1TuipR+7hmYjxeZsonGLNcmgsKp5EUDCEj9SvRyxX2uMUNfINmfNqglBYNNtjtNmdwWV2ly4uQKheyDyka2RTRoQ3IEfs+0BNcGJ4Z5AnmHNpFbCKW5PsXkAzJ6VVzzVMo0fwIUpQQT67itTNRE946/NxDashl9KuAFUbZ6yW91vObh+WAMZ1mQ1J4wotF6KXHuo65X6wSz406hW/T6XZMf/6W+HGYUxCDfhyjPaoMGcWccmbYM/H35NdHTOd79Jg0ho/BDBvRy2vcg8pHsv07UYiKrDFeqzL0Qk7qCkXLuukl2EKuR3xS6VtsLEaT0BfWoDYoQ1YvEjjT729XNMYoCX3j+2ApedBG/UHLOJ7AAnfPSqdmmePsY+522MpfPaf7kf6fIJMn0/4SE6PmuI3yjyeGjWn+1qj/ukf09DE
@tlvenn
tlvenn / logger_plug_formatter.ex
Created July 14, 2021 07:02
LoggerJSON Formatters
defmodule Web.LoggerPlugFormatter do
@moduledoc """
Formats connection into Logger metadata:
* `connection.type` - type of connection (Sent or Chunked);
* `connection.method` - HTTP request method;
* `connection.request_path` - HTTP request path;
* `connection.request_id` - value of `X-Request-ID` response header (see `Plug.RequestId`);
* `connection.status` - HTTP status code sent to a client;
* `connection.params` - HTTP filtered params;
* `client.user_agent` - value of `User-Agent` header;
@tlvenn
tlvenn / ultrawide-simple.js
Created February 21, 2023 03:28 — forked from lukepighetti/ultrawide-simple.js
My Amethyst Ultrawide Layout
const centerColumnWidthFactor = 0.4;
// Prioritizes center with adjustable width factor
// Fills column left, then right
// Then splits right column vertically
// Then splits left column vertically
function layout() {
return {
name: "Ultrawide Simple",
getFrameAssignments: (windows, screenFrame) => {