Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nixoncode's full-sized avatar

Nixon Kosgei nixoncode

View GitHub Profile
@nixoncode
nixoncode / kenya-counties.html
Last active November 6, 2023 07:24
Kenya counties select drop down menu in html arrange in alphabetical order
<select>
<option value="baringo">Baringo</option>
<option value="bomet">Bomet</option>
<option value="bungoma">Bungoma</option>
<option value="busia">Busia</option>
<option value="elgeyo marakwet">Elgeyo Marakwet</option>
<option value="embu">Embu</option>
<option value="garissa">Garissa</option>
<option value="homa bay">Homa Bay</option>
<option value="isiolo">Isiolo</option>
# http service configuration.
http:
# http host to listen.
address: 0.0.0.0:8080
# http worker pool configuration.
workers:
# php worker command - point to the entry point
command: "php public/index.php"
# worker pool configuration(for dev env)
pool:
<?php
use DI\ContainerBuilder;
use Slim\Http\Response;
use DI\Bridge\Slim\Bridge;
use Spiral\Goridge\StreamRelay;
use Spiral\RoadRunner\PSR7Client;
ini_set('display_errors', 'stderr');
@nixoncode
nixoncode / composer.json
Last active October 8, 2020 21:39
golang roadrunner php slim application example
{
"name": "nkosg/php-go-roadrunner",
"description": "a php slim application run by golang using roadrunner",
"type": "project",
"require": {
"slim/slim": "^4.5",
"spiral/roadrunner": "^1.8",
"slim/psr7": "^1.2",
"php-di/slim-bridge": "^3.0",
"slim/http": "^1.0"
{
"name": "nkosg/php-go-roadrunner",
"description": "a php slim application run by golang using roadrunner",
"type": "project",
"require": {
"slim/slim": "^4.5",
"spiral/roadrunner": "^1.8",
"slim/psr7": "^1.2",
"php-di/slim-bridge": "^3.0",
"slim/http": "^1.0"
@nixoncode
nixoncode / main.dart
Created April 24, 2020 14:37
dart test
void main() {
outer() {
var counter = 0;
incrementCounter() {
counter++;
print(counter);
}
return incrementCounter;
}
{"lastUpload":"2020-02-26T02:21:52.234Z","extensionVersion":"v3.4.3"}
email: ^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$
@nixoncode
nixoncode / bash_profile.sh
Created February 9, 2018 07:59
A .bashrc file fo my terminal on ubuntu
# colors!
green="\[\033[0;32m\]"
blue="\[\033[0;34m\]"
purple="\[\033[0;35m\]"
reset="\[\033[0m\]"
export GIT_PS1_SHOWDIRTYSTATE=1
# '\u' adds the name of the current user to the prompt
# '\$(__git_ps1)' adds git-related stuff
# '\W' adds the name of the current directory
@nixoncode
nixoncode / 0_reuse_code.js
Created May 10, 2017 09:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console