This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::io; | |
| use std::io::{ Write }; | |
| use super::TARBOX_MAGIC; | |
| use super::attributes; | |
| use super::attributes::AttributeContainer; | |
| #[derive(Clone, Debug)] | |
| pub struct Encoder<A> where A: attributes::AttributeContainer { | |
| inner: Vec<u8>, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Process to add salt repo | |
| cd to salt repo | |
| git clone https://github.com/saltstack-formulas/openssh-formula.git openssh | |
| cd openssh/ | |
| git config core.sparsecheckout true | |
| echo openssh/ >> .git/info/sparse-checkout | |
| git read-tree -mu HEAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const initialState = { | |
| debug: false, | |
| item: null, | |
| }; | |
| function makeProxyContext(currentState, updateState) { | |
| let cur = Object.assign({}, currentState); | |
| let proxyState = new Proxy(updateState, { | |
| get(_, prop, receiver) { | |
| return cur[prop]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>com.github.radhifadlillah.shiori</string> | |
| <key>Program</key> | |
| <string>/Users/sean/.go/bin/shiori</string> | |
| <key>ProgramArguments</key> | |
| <array> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BEGIN { | |
| matched = 0; | |
| if (!display) { | |
| print "No display variable set"; | |
| exit; | |
| } | |
| } | |
| # Matches modelines | |
| match($0, /^[[:blank:]]+/) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| import io | |
| import os | |
| import re | |
| import sys | |
| from os import path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # this is the base test case of the DI prototype | |
| import logging | |
| import sys | |
| from typing import Callable, Type | |
| from diecast.component import Component | |
| from diecast.inject import build_passthru_args, make_injector | |
| from diecast.registry import get_registry, register_component |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "reflect" | |
| "time" | |
| ) | |
| type Result struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def dict_tap(path, default=None): | |
| """ Retrieves the path through a dictionary. | |
| "The config is a lot like an onion - it has layers" | |
| example: | |
| >>> dict_tap( | |
| >>> 'otp.age_threshold', | |
| >>> default=2, | |
| >>> ) | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Place this in ~/.tmuxp/cockpit.yaml OR in the root of your cockpit directory as .tmuxp.yaml | |
| session_name: cockpit-dev | |
| shell_command_before: | |
| # Change this to pop in to your cockpit dev dir! | |
| - cd ~/Projects/cockpit | |
| - workon cockpit | |
| windows: | |
| - window_name: services | |
| layout: main-horizontal |