Skip to content

Instantly share code, notes, and snippets.

View nelsonsequiera's full-sized avatar
🤷‍♂️
Experiment - Fail - Learn - Repeat

Nelson Sequiera nelsonsequiera

🤷‍♂️
Experiment - Fail - Learn - Repeat
View GitHub Profile
@nelsonsequiera
nelsonsequiera / mac_setup.txt
Last active December 11, 2018 07:36
mac setup
'''
Mac store apps:
Termius
copyclip
bandwidth+
lastpass
External Apps:
CheatSheet
@nelsonsequiera
nelsonsequiera / django_show_queries_on_console.txt
Last active December 11, 2018 07:35
django show queries on console
import logging
l = logging.getLogger('django.db.backends')
l.setLevel(logging.DEBUG)
l.addHandler(logging.StreamHandler())

whenever you do changes to database models in Django:

  • run python manage.py makemigrations
  • run python manage.py migrate
  • add the newly created migration file to git.
    • git add <migration_file_name>. You will find this file in migrations directory of your app.
    • git add <models.py file>.
  • commit the file to git.
@nelsonsequiera
nelsonsequiera / svg facebook.html
Created March 17, 2019 07:45
Social SVG for facebook, stack overflow, github, linkedin which are base64 encoded
<!-- facebook -->
<img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4Igp3aWR0aD0iNTAiIGhlaWdodD0iNTAiCnZpZXdCb3g9IjAgMCA1MCA1MCIKc3R5bGU9IiBmaWxsOiMwMDAwMDA7Ij4gICAgPHBhdGggc3R5bGU9ImxpbmUtaGVpZ2h0Om5vcm1hbDt0ZXh0LWluZGVudDowO3RleHQtYWxpZ246c3RhcnQ7dGV4dC1kZWNvcmF0aW9uLWxpbmU6bm9uZTt0ZXh0LWRlY29yYXRpb24tc3R5bGU6c29saWQ7dGV4dC1kZWNvcmF0aW9uLWNvbG9yOiMwMDA7dGV4dC10cmFuc2Zvcm06bm9uZTtibG9jay1wcm9ncmVzc2lvbjp0Yjtpc29sYXRpb246YXV0bzttaXgtYmxlbmQtbW9kZTpub3JtYWwiIGQ9Ik0gOSA0IEMgNi4yNTA0ODM5IDQgNCA2LjI1MDQ4MzkgNCA5IEwgNCA0MSBDIDQgNDMuNzQ5NTE2IDYuMjUwNDgzOSA0NiA5IDQ2IEwgMjUuODMyMDMxIDQ2IEEgMS4wMDAxIDEuMDAwMSAwIDAgMCAyNi4xNTgyMDMgNDYgTCAzMS44MzIwMzEgNDYgQSAxLjAwMDEgMS4wMDAxIDAgMCAwIDMyLjE1ODIwMyA0NiBMIDQxIDQ2IEMgNDMuNzQ5NTE2IDQ2IDQ2IDQzLjc0OTUxNiA0NiA0MSBMIDQ2IDkgQyA0NiA2LjI1MDQ4MzkgNDMuNzQ5NTE2IDQgNDEgNCBMIDkgNCB6IE0gOSA2IEwgNDEgNiBDIDQyLjY2ODQ4NCA2IDQ0IDcuMzMxNTE2MSA0NCA5IEwgNDQgNDEgQyA0NCA0Mi42Njg0ODQgNDIuNjY4NDg0IDQ0IDQxIDQ0IEwgMzMgNDQgTCAzMyAzMCBMIDM2LjgyMD
@nelsonsequiera
nelsonsequiera / object_leveller.js
Created May 14, 2019 07:05
js object leveller
module.exports.objectLeveller = (obj, outputObj, outputPath) => {
var outputAccObj = outputObj || {};
var outputAccPath = outputPath || [];
return Object.getOwnPropertyNames(obj).reduce(function (outputAccObj, key) {
outputAccPath.push(key);
if (typeof obj[key] === 'object' && !!obj[key]) {
objectLeveller(obj[key], outputAccObj, outputAccPath);
} else {
outputAccObj[outputAccPath.join('_')] = obj[key];

sudo bash ./entermedia-docker.sh alchemy-dam 100

A pottery teacher split her class into two halves.
To the first half she said, “You will spend the semester studying pottery, planning, designing, and
creating your perfect pot. At the end
of the semester, there will be a competition to see whose pot is the best”.
To the other half she said, “You will spend your semester making lots of pots. Your grade will be
based on the number of completed pots you
finish. At the end of the semester, you’ll also have the opportunity to enter your best pot into a
competition.”
import requests
import json
import time
import csv
import pandas as pd
# step 1: get all followers html content manually from insta page. in one line keep only one username (without quotes and comma.)
def get_usernames():