This file contains hidden or 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
SETLOCAL | |
CALL test.cmd | |
IF ERRORLEVEL 1 ( | |
SET TESTRET=1 | |
) ELSE ( | |
: # Do something with some envvars that test.cmd set that | |
: # we want to protect our own cmd code from. | |
) | |
: # Rely on undelayed expansion semantics to communicate variables | |
: # out of the SETLOCAL/ENDLOCAL :-D. Though, I suspect that if |
This file contains hidden or 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
ohnobinki@gibby ~ $ cd UseMef/ | |
ohnobinki@gibby ~/UseMef $ mono ./UseMef.exe | |
Plugin SomePlugin | |
ohnobinki@gibby ~/UseMef $ rm SomePlugin.dll | |
ohnobinki@gibby ~/UseMef $ mono ./UseMef.exe | |
ohnobinki@gibby ~/UseMef $ make | |
mcs /o:'SomePlugin.dll' /t:library SomePlugin.cs /r:UseMef.exe | |
ohnobinki@gibby ~/UseMef $ mono ./UseMef.exe | |
Plugin SomePlugin |
This file contains hidden or 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 python | |
import datetime | |
class Job(object): | |
def __init__(self, mean_hours, dates): | |
self.mean_hours = mean_hours | |
self.dates = dates | |
def parse_date(s): |
This file contains hidden or 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
diff --git a/configure.in b/configure.in | |
index 67acee0..dc98c90 100644 | |
--- a/configure.in | |
+++ b/configure.in | |
@@ -43,22 +43,20 @@ AC_ARG_WITH([localdir], | |
withval="/usr/pkg" | |
elif test -d /opt/lib ; then | |
withval="/opt" | |
- else | |
- with_extra_libdir="no" |
This file contains hidden or 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 python | |
import csv, io | |
with io.StringIO() as os: | |
writer = csv.writer(os) | |
writer.writerow(['hi', 'bye']) | |
writer.writerow(['there', 'here']) | |
# You would figure out how to pass this to your email system | |
print(os.getvalue()) |
This file contains hidden or 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
*.exe | |
*.o | |
blah-c11 |
This file contains hidden or 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
DECLARE @done BIT = 0; | |
IF 1=0 | |
BEGIN | |
faker: | |
PRINT 'x'; | |
SET @done = 1; | |
END | |
DECLARE @not BIT = @done; | |
PRINT @not; | |
IF @done = 0 |
This file contains hidden or 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 python | |
# -*- coding: utf-8 -*- | |
import abc | |
# Define an abstract class for our public interface. | |
class Human(object): | |
__metaclass__ = abc.ABCMeta | |
@abc.abstractmethod | |
def eat(self): |