code GitHub Tips Currently this is the current process I am using for GitHub. * Fork the original repository from GitHub website. * Open the GitHub Desktop client. * Clone the newly forked repository with the GitHub Desktop client * Open the the folder with git shell Fetch all the changes on the main branch that have
code MS SQL Server - Full Text Search Index Wanted to be able to search across multiple text columns at first thought about difficult joins and views, but then remembered that almost every modern database system has this builtin as default functionality and since I am having to do MS SQL Server databases for the most part this is
code Sql Table Function - Memorable Alias Generator Wanted to create a User Defined Function in MS SQL server that would generate memorable aliases for users to use. First point is that a UDF function does not allow you to create temp tables within it or use side effecting functions like NEWID() which was not fun, but you
code ServiceStack: OrmLite SqlExpression Tip When creating complicated clauses for queries use the underlying IDBconnection with the template type of the underlying source, but make sure to use the db.From() and then append the Where clauses afterwards in a series to generate the appropriate parameterized and checked clause. Once the SqlExpression is built you
code Push notifications template Created this file using the Push.js to allow simple push notifications in JavaScript like this Notify.info({ title: this.title, message: "No changes to undo." }); with an import like this import * as Notify from "../utilities/notify"; That references this file with the following contents. import
code Working with react-refetch Solid project for simplifying the your react interactions with a server API data models react-refetch import React from "react"; import ReactDom from "react-dom"; import { connect, PromiseState } from "react-refetch"; import { globalStyles } from "../../styles"; import { Urls } from "../../redux/serviceurls"; import * as Notify
code Static and Functional Programming * Reduces cognitive load\n* Makes testing straightforward and clear* * Easier to build * Known resources can be versioned * Excellent post on this https://platform.sh/blog/containers-are-the-new-static-binaries * This part is so true and earned from many issues that come with experience. * Static typing is great because you really want the error
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
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>
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