Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am jonbesga on github.
  • I am jonander (https://keybase.io/jonander) on keybase.
  • I have a public key ASAWnuA47UB_v6710gDHVYyFadi7mo7JaayEWS5QHam7vQo

To claim this, I am signing this object:

@jonbesga
jonbesga / index.js
Created Jul 26, 2018
React example
View index.js
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import registerServiceWorker from './registerServiceWorker';
class Clock extends React.Component{
constructor(props) {
super(props);
this.state = { date: new Date(), clicks: 0 };
this.incrementItem = this.incrementItem.bind(this);
@jonbesga
jonbesga / milan.py
Created Jul 25, 2018
Exercises day 1
View milan.py
# lights_on = True
# if lights_on:
# print('lights are on')
# else:
# print('lights are not on')
# street_light = "blue"
# if street_light == "red":
# print('red')
# elif street_light == "green":
View script.py
import random
def throwDices(number_of_dice, type_of_die):
results = []
for i in range(0, number_of_dice):
number = random.randint(1, int(type_of_die.split('d')[1]))
results.append(number)
print(results)
@jonbesga
jonbesga / CHECKLIST.md
Last active May 5, 2017
Steps from zero to launch
View CHECKLIST.md

The process from Zero to Launch

THE FUCKING IDEA

  1. Write down every idea you have.
  2. Analyze how useful can be. Is going to be more people like you?

DESIGN

DESIGN THE LANDING PAGE

  1. Prepare social meta tags
@jonbesga
jonbesga / gitstart_script.sh
Last active Mar 24, 2017
create_repo_and_first_commit
View gitstart_script.sh
USER=jabesga
REPO_NAME=$(basename "$PWD")
DATA="{\"name\":\"${REPO_NAME}\"}"
echo "Creating repository ${REPO_NAME}"
curl --fail --silent -u $USER --data $DATA https://api.github.com/user/repos > /dev/null
echo "Initializing local git repository ${REPO_NAME}"
git init
echo "Adding remote"
git remote add origin git@github.com:$USER/$REPO_NAME.git
echo "First commit and push"
@jonbesga
jonbesga / dilbert.py
Created Jan 14, 2017
Dilbert download all comics
View dilbert.py
from bs4 import BeautifulSoup
import requests
import shutil
import os
def download_comic(year, month, day):
url = f'http://dilbert.com/strip/{year}-{month:02}-{day:02}'
print(f'Looking {url}')
@jonbesga
jonbesga / config.py
Last active Jul 13, 2016
Basic Facebook OAuth implementation for Flask
View config.py
APP_ID = YOUR_APP_ID
REDIRECT_URI = 'http://localhost:5000/callback/facebook'
SCOPE = 'public_profile,email'
APP_SECRET = YOUR_APP_SECRET