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/bash | |
# Asking for serial number | |
echo -e "Enter serial number:" | |
read SerialNumber | |
SerialNumberCount=${#SerialNumber} | |
if [[ ${SerialNumberCount} > "11" ]]; then | |
# If Serial is 12 or more characters, set the ModelSerial to four digits | |
ModelSerial=$(echo $SerialNumber|awk '{ print substr( $0, length($0) - 3, length($0) ) }') | |
else |
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
set bell-style none | |
set completion-ignore-case On | |
set echo-control-characters Off | |
set enable-keypad On | |
set mark-symlinked-directories On | |
set show-all-if-ambiguous On | |
set show-all-if-unmodified On | |
set skip-completed-text On | |
set visible-stats On | |
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
#include <stdio.h> | |
#include <strings.h> | |
#include <math.h> | |
#define SIZE 255 | |
int main(void) | |
{ | |
char |
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
// ask for two strings and join the first half of the first string | |
// with the second half of the second string. | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#define SIZE 255 | |
// Getting string input // |
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
// ask for two strings and join the first half of the first string | |
// with the second half of the second string. | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#define SIZE 255 |
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
// ask for two strings and join the first half of the first string | |
// with the second half of the second string. | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#define SIZE 255 |
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/bash | |
IFS=$'\r' | |
fortune_lines=($(fortune | sed -e 's/^/say /' | fold -w 90 )) | |
Screen_Session=`screen -ls|grep "\."|grep "("|awk '{print $1}'` | |
Screen_OneLiner=$(screen -p 0 -S ${Screen_Session} -X stuff "`printf "${fortune_lines[@]}\r"`") | |
for var in "${Screen_OneLiner[@]}" | |
do | |
echo "${var}" | |
done |
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/bash | |
# minecraft screen session | |
SCREEN_SESSION=minecraft | |
# using xmlstarlet http://xmlstar.sourceforge.net to parse xml/rss and return latest twitter status | |
function TwitGet () { | |
RSS_URL=api.twitter.com/1/statuses/user_timeline/$1.rss | |
rssversion=$(wget ${RSS_URL} -O - 2>/dev/null | | |
xmlstarlet sel -T -t -v '/rss/channel/item[1]/title') |