code Glitch API test tool Created a glitch remixable project for use in turfjs presentation to be given. TurfJS - Glitch [https://blue-basement.glitch.me/] Did some simple cleanup and a few modifications to the empty test API. Easy tool to learn NodeJS programming with many assumed features to help you get started smoothly and
code NodeJS - Hapi & Postgres Working through writing prototype of NodeJS Web API using Hapijs and Postgres as the backing store. Compared to Visual Studio the process of development is so much lighter and easier. Secondly as it is light and fluid the tests are being written quickly and validating cleanly. Choosing hapijs seems to
code Url Rewriting Apache/Nginx Had to learn about url rewrite engines for both **Apache **and **Nginx **to test a url rewrite for these servers Needed something like this http://server2:port/blah/zaps/#/pow?map=theMap By inputting something like this http://server/site/theMap Apache config that works <VirtualHost :80> ServerName
personal No estimates Estimation is so ingrained in software development that it is just assumed that you will provide estimates for everything you do. First point estimates are never treated as they should be i.e. guesses when provided. They are instead treated as promises and many times guarantees. This abuse of the
code TeamCity Docker Upgrade First download and setup docker on target server. My current setup is Ubuntu 17.04 virtual machine run through VMWare Setup docker to run automatically on startup docker run -it --restart=always --name teamcity-server-instance -v /opt/teamcity/data:/data/teamcity_server/datadir -v /opt/teamcity/logs:/opt/teamcity/logs -p
code Increase Oracle Tablespace This problem comes up when running Oracle XE Edition which is intentionally crippled to fuck with you. Hate Oracle databases so much. Find out the current tablespaces raw files. You will need rights, but since this is Oracle XE you should be able to grant or log in as system
code Bash prompt to running container docker exec -t -i container_name /bin/bash This is important and most likely any container you log into you will be running as root so can make local modifications to a running instance if needed. Note Changes are transient and will disappear on next startup.
code Background Threads & Cancellation Tokens Start a thread in the background as a fire and forget, but have it check for cancellation in its internal notification loop. ThreadPool use to queue up the delegate that starts the thread threadSource = new CancellationTokenSource(); // Use thead pool to start a background thread ThreadPool.QueueUserWorkItem(NotificationListener, threadSource.Token); Details
code Convention over Configuration https://mikehadlow.blogspot.se/2012/05/configuration-complexity-clock.html [https://mikehadlow.blogspot.se/2012/05/configuration-complexity-clock.html%5Cn%5CnThis] This [https://mikehadlow.blogspot.se/2012/05/configuration-complexity-clock.html%5Cn%5CnThis] happens every time. Stick to hardcoded values whenever you can and simple configurations as much as possible such as simple ini.
code Reading Async JSON as stream Knowing that the dataset coming back may be large and will take time to receive as well as decoding the each element as it is parsed from the stream to reduce cpu and memory load Helpful generic HttpClient extension class public static class HttpClientExtensions { private static IEnumerable<T>
personal Challenge and Succeed Inertia and fear of change are how businesses and organizations age and die. To be a learning knowledge based organization these are great points.
code Conditional Callback Function First attempt. Was going to use .bind(null, functionTarget), but that didn't seem to work and in a hurry to get this done. A pox upon JavaScript and the need to check all the types and properties as there could be a null/undefined in there and also
code Post MVC This post https://news.realm.io/news/the-post-mvc-age/ clearly explains that the MVC model has reached its endpoint with the rise of Single Page Applications. I would add that http://elm-lang.org should be on this and that both Reactive Extensions and React/Redux work easier in a functional programming
code Git update forked repository from origin/master Add the remote, call it "upstream": git remote add upstream https://github.com/whoever/whatever.git Fetch all the branches of that remote into remote-tracking branches, such as upstream/master: git fetch upstream Make sure that you're on your master branch: git checkout master Rewrite your
code Scan Active Directory for User Information Fighting with a way to automatically get a windows authenticated users information from Active Directory. Settled on the following methods. Create a list of lookup functions for things to try private static readonly IReadOnlyCollection<Func<IIdentity, User>> UserLookupFns = new List<Func<IIdentity, User>
code Migrate Subversion Repository to GitHub First if your subversion repository is internet accessible and has a valid SSL certificate this is easy as GitHub provides an simple import tool, but I don't have either of those on this subversion server so this is the extremely offline and hard way to migrate a repository
code Three questions to ask on upgrading a feature * Is this used? If not delete code and functionality. * If it is please state an example of use. * Would a constant cover the majority of cases? If so use. This will be used to create a test for verification of completeness.
code ConDep Deployment Details Install Powershell 3 or higher * Enable-PSRemoting * Make sure to create a local user account that exists in the local administrators group * Add Web Platform Installer so you can add WebDeploy 3.6 at least * Set the local administrator user you added as a web deployment manager for your website * Make
code Auto Update Cron jobs First line is to renew a ssl certificate from letsencrypt. However this never seems to work because it wants to take exclusive control of the current webservers ports 80, 443, etc. Need to adjust this better. Happens twice a day at 1 minute after 12am and 12pm. The second line
code MS SQL Synchronize Login If you restore a database and the sql login already exists on your system versus the source system, this can cause SID (Security Identifier) mismatches. The solution is to run a query to reassociate a login for a particular foreign source database which you restored and has the same sql
code Simplest Nginx Load Balancer Config Put this in the default location for Nginx of /etc/nginx/sites-available/default upstream tiles { server machine1:59005; server machine2:59005; server machine3:59005; server machine4:59005; server machine5:59005; server machine6:59005; server machine7:59005; server machine8:59005; server machine9:59005; server machine10:59005; } server { listen 80; location / { proxy_
code Force clean database log files MS SQL The interactive tools are not working, but this script will clear a stubborn log file that won't release. Link here http://stackoverflow.com/questions/56628/how-do-you-clear-the-sql-server-transaction-log Assumption: You are in simple mode USE TheDatabase; GO CHECKPOINT; GO CHECKPOINT; -- run twice to ensure file wrap-around GO DBCC SHRINKFILE(
resume Systems Administrator Test I wrote the following test for a Systems Administrator based on tasks I had done or they would be expected to do on a regular basis. Systems Engineer Test: You will have two hours to complete the test. You will need to keep close track of your time. The test
conference Function Length as an indicator of issues Running through some code here and keep seeing other entrenched programmers writing monstrous 150 line methods that are void typed. WHY?! See here for more detail: https://martinfowler.com/bliki/FunctionLength.html The longer the function the closer it becomes to unmaintainable because the more lines you write the more
personal Writing Software in an Agile Manner I joke, but some days it feels like this. Today being one of them.