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
diff --git a/.classpath b/.classpath | |
index 32cc52b..1e553d7 100644 | |
--- a/.classpath | |
+++ b/.classpath | |
@@ -36,10 +36,10 @@ | |
<attribute name="maven.pomderived" value="true"/> | |
</attributes> | |
</classpathentry> | |
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | |
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> |
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
import Draft | |
import FreeCAD | |
def pointToCoords(point): | |
x=float(point[0])*1000 | |
y=float(point[1])*1000 | |
z=float(point[2])*1000 | |
return (x,y,z) | |
def fefread(feffile): |
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
Please consider the following output. It was created by running an xslt script on itself. | |
You can easily reconstruct most of the script from this output. Most of it. | |
Level 0: reconstruct the script | |
Level 1: modify the script such that all of the script is reconstructable from its output | |
Level 1a: modify the script such that the output is "better" in some ways. E.g. ';' instead of '{}', | |
omission of things like 'select=', 'name=', 'test=' where it is unambigous, use 'let' or 'var' instead of xsl:variable, | |
'/"<pattern>"/' instead of 'xsl:template(match="<pattern>")', etc. | |
Level 2: modify the script such that it emits all xml constructs in a reconstructable way (e.g. processing instructions) | |
Level 3: write something which actually reconstructs the original xml | |
Level 4: write the reconstructing logic in xslt |
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
in github I created a 'github application', with user authorization callback url as https://kode-konveyor.eu.auth0.com/login/callback | |
in auth0 I have created a 'regular web application', and enabled github. | |
relevant apache configuration: | |
DocumentRoot /var/www/repo | |
OIDCProviderMetadataURL https://kode-konveyor.eu.auth0.com/.well-known/openid-configuration | |
OIDCClientID Iv1.e37ead34f234dcfe | |
OIDCClientSecret '<the auth0 client secret>' |
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
dronestart script. You run it once, and you will have a daemon forever. Docker makes sure that the container is started whenever docker starts. | |
#!/bin/bash | |
set -x | |
docker kill drone | |
docker rm drone | |
docker run \ | |
--volume /var/lib/drone:/var/lib/drone \ | |
--volume /var/run/docker.sock:/var/run/docker.sock \ | |
--volume /etc/ssl:/etc/ssl:ro \ |
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
mag@tomcat:~$ cat /etc/tomcat7/logging.properties | |
handlers= com.agafua.syslog.SyslogHandler | |
.level= INFO | |
# Syslog logger | |
com.agafua.syslog.SyslogHandler.transport = udp | |
com.agafua.syslog.SyslogHandler.facility = local0 | |
com.agafua.syslog.SyslogHandler.port = 514 | |
com.agafua.syslog.SyslogHandler.hostname = localhost |
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
@version: 3.5 | |
@include "scl.conf" | |
# First, set some global options. | |
options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no); | |
owner("root"); group("adm"); perm(0640); stats_freq(0); | |
bad_hostname("^gconfd$"); | |
}; |
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
# ----------------/usr/local/bin/mkidentity_req ------------- | |
#!/bin/bash | |
cd /etc/ssl/private/ | |
hostname=$(hostname -f) | |
echo "creating request for $hostname" | |
openssl req -subj "/CN=$hostname/" -new -newkey rsa:2048 -passout pass:changeit -out newreq.pem | |
openssl rsa -in privkey.pem -out privkey.key -passin pass:changeit | |
cp newreq.pem ~ | |
echo req is at ~/newreq.pem | |
#---------------------------------------------------------------- |
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
//STEP 1. Import required packages | |
import java.sql.*; | |
public class JdbcQuery { | |
// JDBC driver name and database URL | |
static final String JDBC_DRIVER = "org.postgresql.Driver"; | |
public static void main(String[] args) { | |
if(args.length != 2) { | |
System.err.printf("usage: java [java opts] -cp <classpath containing jdbc driver and JdbcQuery> JdbcQuery <connection string> <sql>\n"); |