Skip to content

Instantly share code, notes, and snippets.

View YannMjl's full-sized avatar
💭
Learning is experience; everything else is just information!

Yann Mulonda YannMjl

💭
Learning is experience; everything else is just information!
View GitHub Profile
;----------------------------------------------------------------------------------------------------------------------*
;Behold, our middleware! Note that it's common to prefix our middleware name *
;with "wrap-", since it surrounds any routes an other middleware "inside" *
; *
; We can attach our middleware directly to the main application handler. All *
; requests/responses will be "filtered" through our logging handler. *
;----------------------------------------------------------------------------------------------------------------------*
(defn allow-cross-origin
"Middleware function to allow cross origin requests from browsers.
@YannMjl
YannMjl / .bash_profile
Created August 17, 2018 01:18
my mac pro .bash_profile configuration
# -------------------------------------------------------------------------- #
# Welcome Message
# -------------------------------------------------------------------------- #
echo "Hi Yann! Welcome back!"
# -------------------------------------------------------------------------- #
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# anagram_palindrome
#
# Write a function which accepts an input word and returns true or false
# if there exists an anagram of that input word that is a palindrome.
# O(n) => linear
# O(1) => constant
# palindrome : is a string that read the same from front to back
# and back to front : noon, eye,
# Dictionary in python are also refered to as hash table in other languages like java
# initialize a dictionary
a_dict = {'FirstName': 'Yann', 'LastName': 'Mulonda', 'age': 177, 'year': 2018}
print(a_dict)
# retrive value from a key
print("We are in the year: ", a_dict['year'])
# add a new key and value
# Arrays
# given an array or a Python list of integers, write a function which takes
# the given array and finds and returns the second largest number in this array.
# given array
numbers_list = [2, 5, 1, 9]
# For this question, you might ask, "could this array be empty?"
# The answer is yes, you should return none in that case. It just means that
# Given a string, do some operations
# a string in python can be traited a list that store characters
# however, unlike a list, a string is ummutbale. meaning: it can't be changed
# initialiaze a string
a_string = "This is a strig"
print(a_string)
# given a string, letter = "ABCD"
const { app, BrowserWindow } = require('electron')
let win;
function createWindow () {
// Create the browser window.
win = new BrowserWindow({
width: 600,
height: 670,
icon: `file://${__dirname}/dist/assets/logo.png`
{
"name": "my-angular-electron-app-demo",
"version": "0.0.0",
"main": "main.js", // <-- update here
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
#!bash
#
# git-flow-completion
# ===================
#
# Bash completion support for [git-flow](http://github.com/nvie/gitflow)
#
# The contained completion routines provide support for completing:
#
# * git-flow init and version
<?xml version="1.0" encoding="UTF-8"?>
<breakfast_menu>
<food>
<name>Belgian Waffles</name>
<price>$5.95</price>
<description>Two of our famous Belgian Waffles with plenty of real maple syrup</description>
<calories>650</calories>
</food>