This file contains 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 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 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 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 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 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
//! This is a sample named pipe server. | |
//! The server expects a file path to be passed on the command line as the first arg. | |
//! The server will create a pipe at the given path if it doesn't already exist. | |
//! The server will read pairs of bytes at a time and print the randomly generated number | |
//! to stdout. | |
extern crate ctrlc; | |
extern crate unix_named_pipe; | |
use std::env; |
This file contains 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
#!/bin/sh | |
# fix key if needed | |
if [ -z "$APP_KEY" ] | |
then | |
echo "Please re-run this container with an environment variable \$APP_KEY" | |
echo "An example APP_KEY you could use is: " | |
php artisan key:generate --show | |
exit | |
fi |
This file contains 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 zsh | |
# -*- coding: utf-8 -*- | |
# vim: set ai et ts=4 sts=4 sw=4 syntax=zsh: | |
set -o pipefail | |
function __ensure_envdir() { | |
[[ ! -d "${HOME}/.envmgr.d/" ]] && mkdir -p "${HOME}/.envmgr.d/" | |
return 0 | |
} |
This file contains 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 -*- | |
from __future__ import unicode_literals | |
__doc__ = """ | |
This module contains a polling caller, built on top of Python's | |
stdlib `threading` module. It can be used as an alternative to | |
twisted's `LoopingCall`. | |
Usage: |
This file contains 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
root@cloud bin # upsc usbhid | |
battery.charge: 67 | |
battery.charge.low: 10 | |
battery.charge.warning: 50 | |
battery.date: 2001/09/25 | |
battery.mfr.date: 2013/10/04 | |
battery.runtime: 1007 | |
battery.runtime.low: 120 | |
battery.type: PbAc | |
battery.voltage: 27.0 |