Skip to content

Instantly share code, notes, and snippets.

View VictorOmondi1997's full-sized avatar
👨‍💻
Data Plumber

VICTOR OMONDI VictorOmondi1997

👨‍💻
Data Plumber
View GitHub Profile
@VictorOmondi1997
VictorOmondi1997 / global-pycon-events.md
Last active August 20, 2019 13:16
Global Pycon Events

Global Pycon Events

Events have to have some focus on Python: The event should either target Python, a project written in Python, or showcase Python in some form.

Examples are Python conferences, conferences which have a Python track or tutorial, conferences at which Python is presented in some form. The same goes for conferences which target a project written mostly in Python (e.g. Plone, Django, OpenStack, etc.) and for other events such as sprints.

A Pen by Victor Omondi on CodePen.

License.

@VictorOmondi1997
VictorOmondi1997 / index.md
Last active August 4, 2019 20:43
Coding tip

Aviod using any magic numbers

Usecase:

if(memberCount > 256) {
  return 'member limit reached';
}

NPM tip:

To install a particular version of a package try 👇

npm i <package-name>@<version>

Ex:

@VictorOmondi1997
VictorOmondi1997 / index.md
Last active August 10, 2019 05:47
CSS BOX-SIZING TIP FOR BEGINNERS

CSS tip for beginners:

Ever saw this piece of code at the top of a CSS file?

{
  box-sizing: border-box;
}

It is used to prevent breaking box dimensions with margin, padding or borders.*

@VictorOmondi1997
VictorOmondi1997 / index.md
Created August 11, 2019 17:25
Know your HTML tag | <figure></figure>

Know your HTML tag!

Want to add a caption to an image?

Try this tag:

<figure>
    <img src="path to your awesome image" alt="Awesome Image" />
 
@VictorOmondi1997
VictorOmondi1997 / CSS-variable.md
Created December 2, 2019 07:12
CSS variables for beginners

CSS Variables for beginners

:root {
    --imary-color: #f03d06;
  }

  .main-header {
    color: var(--primary-color);
 }
@VictorOmondi1997
VictorOmondi1997 / URL-Parameters-in-Flask-vs-Express.md
Created January 11, 2020 20:50
URL Parameters in Flask vs Express

Flask

@app.route('/api/v1/users/<user_id>')
def handler(user_id):
    # route handler
   # use user_id

Express

import africastalking
username = "africa username" # use 'sandbox' for development in the test environment
# use your sandbox app API key for development in the test environment
api_key = "africa's talking api key"
africastalking.initialize(username, api_key)
# # Use the service synchronously
@VictorOmondi1997
VictorOmondi1997 / hello_world.r
Last active May 7, 2020 07:48
Print Hello World in R
print("Hello, World!")
@VictorOmondi1997
VictorOmondi1997 / age.r
Last active May 7, 2020 07:52
Creating a variable age and assign numeric to it.
age <- 17
age