Skip to content

Instantly share code, notes, and snippets.

@quelleck
quelleck / rpi-hdmi.sh
Last active January 13, 2024 07:45 — forked from AGWA/rpi-hdmi.sh
Enable and disable the HDMI port on the Raspberry Pi: `rpi-hdmi on` to turn on, `rpi-hdmi off` to turn off.
#!/bin/sh
# Enable and disable HDMI output on the Raspberry Pi
is_off ()
{
vcgencmd display_power | grep "display_power=0" >/dev/null
}
case $1 in
@matthewdenobrega
matthewdenobrega / graphQLUtils.ts
Last active November 9, 2017 08:23
GraphQL query generator
// Angular imports
import { isArray, isBlank, isDate, isNumber, isStringMap, isPresent, isString } from 'angular2/src/facade/lang'
export class GraphQLUtils {
static createMutation(data: Object, dataDefinition: Object, method: string, mutationName?: string): string {
if (!method || !data) { return null }
let mutation: string = (mutationName || method) + '{' + method
mutation += '(' + GraphQLUtils.flattenObject(data) + ')'