cd <folder>
change to folder
r <file>
insert file below cursor
r !<cmd>
insert command output below cursor
o
begin new line, insert
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
pgrep spotify 1>/dev/null 2>&1 | |
if [ $? != 0 ]; then | |
exit 1 | |
fi | |
xwininfo -root -tree | grep "Spotify -" | sed 's/[ ]*0x[0-9a-f]* "Spotify - \(.*\)": ("spotify" "Spotify").*/\1/' |
pi@raspberrypi:~/UnixBench$ ./Run | |
make all | |
make[1]: Entering directory `/home/pi/UnixBench' | |
Checking distribution of files | |
./pgms exists | |
./src exists | |
./testdir exists | |
./tmp exists | |
./results exists | |
make[1]: Leaving directory `/home/pi/UnixBench' |
#include <stdio.h> | |
int add(int a, int b) | |
{ | |
return a + b; | |
} | |
int addtimestwo(int (*fp)(int,int), int a, int b) | |
{ | |
return (*fp)(a, b) * 2; |
#include <xc.h> | |
#include <stdint.h> | |
#define _XTAL_FREQ 4000000 // required for __delay_ms() | |
#define DELAY 1000 | |
#define THRESHOLD 100 | |
#pragma config MCLRE=OFF, MCPU=OFF, CP=OFF, WDTE=OFF, IOSCFS=4MHZ | |
void |
pdfextract () | |
{ | |
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] ; then | |
echo "Usage: pdfextract <source doc> <first page> <last page>." | |
else | |
OUTPDF=$1_p$2-$3.pdf | |
pdftops $1 - | psselect -p$2-$3 | ps2pdf14 - $OUTPDF | |
echo "Output saved as: $OUTPDF" | |
fi | |
} |
#include <stdio.h> | |
int | |
main (void) | |
{ | |
FILE *f; | |
char name[255]; | |
if( !(f = popen("uname -n", "r")) ){ | |
perror("Can't execute cmd"); |
#include <stdio.h> | |
#include <string.h> | |
int | |
main (void) { | |
char test_string[] = "machinename.local"; | |
char* result = NULL; | |
result = strtok(test_string, "."); |
/* | |
* Copyright (c) 2013 Erlang Solutions Ltd. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |