Skip to content

Instantly share code, notes, and snippets.

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 July 26, 2018 19:51
React example
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 July 25, 2018 19:44
Exercises day 1
# 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":
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 13:21
Steps from zero to launch

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 March 24, 2017 12:44
create_repo_and_first_commit
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 [email protected]:$USER/$REPO_NAME.git
echo "First commit and push"
@jonbesga
jonbesga / dilbert.py
Created January 14, 2017 00:57
Dilbert download all comics
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 July 13, 2016 18:31
Basic Facebook OAuth implementation for Flask
APP_ID = YOUR_APP_ID
REDIRECT_URI = 'http://localhost:5000/callback/facebook'
SCOPE = 'public_profile,email'
APP_SECRET = YOUR_APP_SECRET