Skip to content

Instantly share code, notes, and snippets.

View erssebaggala's full-sized avatar
:octocat:
...

Emmanuel Robert Ssebaggala erssebaggala

:octocat:
...
View GitHub Profile
@erssebaggala
erssebaggala / basecalling_notes.md
Created April 17, 2023 00:16 — forked from sirselim/basecalling_notes.md
a collection of my notes while working on nanopore basecalling on the Jetson Xavier

Jetson Xavier basecalling notes

initial basecalling runs

'fast' flip-flop calling on the Jetson Xavier

guppy_basecaller --disable_pings --compress_fastq -c dna_r9.4.1_450bps_fast.cfg -i flongle_fast5_pass/ -s flongle_test2 -x 'auto' --recursive 
@erssebaggala
erssebaggala / laravel-nginx-config-make-http-exception-url-and-make-all-others-https.md Laravel nginx config to redirect all requests to https and an exception URL that can still be accessible via http

Pre-condition

One day in your Laravel app, you were required to redirect all http requests to https but need to make a certain URL route accessible via http for a certain reason; perhaps a portion of your javascript code needs to redirect to http URL but it can't because redirection to secure URL to insecure is prohibited. Therefore, in cases like this, you need to just allow just one URL to make an http connection.

NOTE: There are obvious security implications here so don't just follow this blindly and understand if this is really the solution you're looking for. The nginx config can somehow be improved, I just don't have the time yet. It sure do look redundant.

Understanding and examples

  • Redirect everything from http to https
@erssebaggala
erssebaggala / nginx.conf
Created April 7, 2020 02:20 — forked from mreschke/nginx.conf
Nginx config for multiple laravel sites based on /api/v1 url paths
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2...
# This also works perfectly for all static file content in all projects
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config.
# Example:
# http://example.com - Main Laravel site as usual
# http://example.com/about - Main Laravel site about page as usual
# http://example.com/robots.txt - Main Laravel site static content as usual
# http://example.com/api/v1 - Lumen v1 api default / route
# http://example.com/api/v1/ - Lumen v1 api default / route
@erssebaggala
erssebaggala / express_in_electron.md
Created October 13, 2019 22:28 — forked from maximilian-lindsey/express_in_electron.md
How to run Express inside an Electron app

How to run Express inside an Electron app

You can run your Express app very easily inside your Electron app.

All you need to do is to:

  • place all the files of your Express app inside a new app folder in your_electron_app\resources\app
  • reconfigure the app.js file
  • refactor some relative pathes in your Express app
@erssebaggala
erssebaggala / express_in_electron.md
Created October 13, 2019 22:28 — forked from maximilian-lindsey/express_in_electron.md
How to run Express inside an Electron app

How to run Express inside an Electron app

You can run your Express app very easily inside your Electron app.

All you need to do is to:

  • place all the files of your Express app inside a new app folder in your_electron_app\resources\app
  • reconfigure the app.js file
  • refactor some relative pathes in your Express app
function Add-EnvPath {
param(
[Parameter(Mandatory=$true)]
[string] $Path,
[ValidateSet('Machine', 'User', 'Session')]
[string] $Container = 'Session'
)
if ($Container -ne 'Session') {
#
# MongoDB (as a windows service)
#
$mongoDbPath = "$env:SystemDrive\MongoDB"
$mongoDbConfigPath = "$mongoDbPath\mongod.cfg"
$url = "https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-3.2.7.zip"
$zipFile = "$mongoDbPath\mongo.zip"
$unzippedFolderContent ="$mongoDbPath\mongodb-win32-x86_64-2008plus-3.2.7"
if ((Test-Path -path $mongoDbPath) -eq $false)
@erssebaggala
erssebaggala / Hash_Code_Pizza_Practice_2018_Try_02.py
Created February 28, 2018 23:06
Hash_Code_Pizza_Practice_2018_Try_02.py
import os
import sys
input_file = sys.argv[1]
def get_all_factors(n):
factors = []
for i in range(1,n+1):
if n%i == 0:
factors.append(i)
@erssebaggala
erssebaggala / Hash_Code_Pizza_Practice_2018_Try_01.py
Created February 28, 2018 19:01
Hash_Code_Pizza_Practice_2018_Try_01
import os
import sys
input_file = sys.argv[1]
def get_all_factors(n):
factors = []
for i in range(1,n+1):
if n%i == 0:
factors.append(i)
@erssebaggala
erssebaggala / update_bulkcm_mo_parent_id.py
Last active February 28, 2018 23:05
Update Bulk CM managed object parent id
from sqlalchemy import create_engine, MetaData, Table
from sqlalchemy.orm import sessionmaker
from sqlalchemy.sql import text
engine = create_engine('postgresql://bodastage:password@database/bts')
vendor_pk=3
tech_pk=3
table_schema='zte_cm_4g'