Skip to content

Instantly share code, notes, and snippets.

name=input.txt
for line in $(echo -e "$name"); do
echo "$name";
done
@tedwardd
tedwardd / alias_sync.sh
Created May 6, 2013 20:01
Scripts for using Mutt successfully with Active Directory and Exchange calendars
#!/bin/bash
if [[ -f /tmp/aliases.old ]]; then
rm -f /tmp/aliases.old
fi
if [[ -f /tmp/aliases.txt ]]; then
mv /tmp/aliases.txt /tmp/aliases.old
fi
@tedwardd
tedwardd / gist:5798119
Created June 17, 2013 16:11
Failed bind OC 5.0.7
{"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1371485428}
{"app":"core","message":"Adding user backend instance of OCA\\user_ldap\\USER_LDAP.","level":0,"time":1371485429}
{"app":"core","message":"include path for class \"OCA_FirstRunWizard\\Config\" starts with \"apps\/\"","level":0,"time":1371485429}
{"app":"user_ldap","message":"Bind failed: -1: Can't contact LDAP server","level":3,"time":1371485429}
{"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1371485445}
{"app":"core","message":"Adding user backend instance of OCA\\user_ldap\\USER_LDAP.","level":0,"time":1371485445}
{"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1371485445}
{"app":"core","message":"Adding user backend instance of OCA\\user_ldap\\USER_LDAP.","level":0,"time":1371485445}
{"app":"user_ldap","message":"Bind failed: -1: Can't contact LDAP server","level":3,"time":1371485445}
{"app":"user_ldap","message":
@tedwardd
tedwardd / gist:22b3a7f5a58d916a481b
Last active August 29, 2015 14:18
vmrun_daemon
#!/bin/bash
export PATH=$PATH:"/Applications/VMware Fusion.app/Contents/Library"
vm="$2"
action="$1"
vm_path="/Users/user/vm-links"
case $1 in
start)
@tedwardd
tedwardd / keybase.md
Created February 6, 2016 17:44
Keybase Proof

Keybase proof

I hereby claim:

  • I am k4k on github.
  • I am tedward (https://keybase.io/tedward) on keybase.
  • I have a public key ASBr-cl7myRj3swB4-t44Is9qantH7h3hB8OXIwCgPfPywo

To claim this, I am signing this object:

spawn perl vmware-install.pl
expect "Press enter to display it. "
send "\r"
expect -ex "--More--"
send "q"
expect "Do you accept? (yes/no) "
send "yes\r"
expect -ex "\[yes\] "
send "yes\r"
expect -ex "\[/usr/bin\] "
 dnf repolist
Last metadata expiration check: 10 days, 0:40:36 ago on Sat May 7 09:43:01 2016.
repo id repo name status
dockerrepo Docker Repository 34
*fedora Fedora 23 - x86_64 46,074
*fedora-source Fedora 23 - Source 17,080
google-chrome google-chrome 3
keybase keybase 1
rpmfusion-free RPM Fusion for Fedora 23 - Free 692
rpmfusion-free-updates-testing RPM Fusion for Fedora 23 - Free - Test 268
@tedwardd
tedwardd / upgrades
Created May 27, 2016 00:15
system-upgrade failure
Removing:
ffmpeg-libs x86_64 2.8.7-1.fc23 @rpmfusion-free-updates-testing
14 M
gstreamer1-libav x86_64 1.6.3-1.fc23 @rpmfusion-free-updates-testing
650 k
kernel x86_64 4.4.7-300.fc23 @updates
0
kernel-core x86_64 4.4.7-300.fc23 @updates
52 M
kernel-debug-devel x86_64 4.4.7-300.fc23 @updates
@tedwardd
tedwardd / ex10.c
Created July 10, 2016 18:35
Sample C demo
#include <stdio.h>
int main(int argc, char *argv[])
{
int i = 0;
// go through each string in argv
// why am I skipping argv[0]?
for (i = 1; i < argc; i++) {
@tedwardd
tedwardd / muttrc
Created August 22, 2016 14:19
Problematic muttrc config
# Sidebar (if it's available)
set sidebar_width=30
set sidebar_visible=yes
set sidebar_delim='|'
set sidebar_sort=yes
color sidebar_new white red
macro index,pager b '<enter-command>toggle sidebar_visible<enter>'
bind index,pager \CN sidebar-next
bind index,pager \CP sidebar-prev
bind index,pager \CO sidebar-open