Skip to content

Instantly share code, notes, and snippets.

View LeonardoDSSilva's full-sized avatar
:octocat:
Focusing

Leonardo Silva LeonardoDSSilva

:octocat:
Focusing
View GitHub Profile
@sloria
sloria / bobp-python.md
Last active July 24, 2024 02:53
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@capesean
capesean / README.md
Last active April 21, 2020 01:18
TopoJSON Property Editor

TopoJSON Property Editor

  1. Supply the tool with some topoJSON data (via url or direct input), and it will draw the map.
  2. Click one of the shapes and you can view and edit the properties of the topoJSON object.
  3. Click the Output tab and you can copy the full, modified topoJSON.

View on http://bl.ocks.org/

@mesgarpour
mesgarpour / appsScript_ListFilesFolders_ver.2.js
Last active July 18, 2024 06:09
[Google Apps Script] List all files & folders in a Google Drive folder, & write into a speadsheet
/*
* Copyright 2017 Mohsen Mesgarpour
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Ashwinning
Ashwinning / AddBashonUbuntuonWindowsToContextMenu.md
Last active April 11, 2022 14:31
Add Bash on Ubuntu on Windows to context menu #gistblog #ubuntu #bash #windows

Add Bash on Ubuntu on Windows to context menu

Bash on Ubuntu on Windows (installation instructions) is a Linux Subsystem for Windows.

To add it to the Windows right click context menu, perform the following steps:

  • Open regedit from the run menu Win + R.
@niw
niw / fetch_nike_puls_all_activities.bash
Last active July 16, 2024 23:37
A simple NikePlus API description to fetch past run metrics
#!/usr/bin/env bash
# fetch_nike_puls_all_activities.bash
# A simple bash script to fetch all activities and metrics from NikePlus.
# See `nike_plus_api.md` for the API details.
readonly bearer_token="$1"
if [[ -z "$bearer_token" ]]; then
echo "Usage: $0 bearer_token"
exit
@gustavohenrique
gustavohenrique / pre-sharedkey-aes.py
Created September 13, 2017 17:52
An example using Python3 and AES criptography
import sys
import base64
from Crypto.Cipher import AES
class AESCipher(object):
def __init__(self, key):
self.bs = 16
self.cipher = AES.new(key, AES.MODE_ECB)
@giobel
giobel / *Dynamo Python snippets*
Last active January 18, 2024 20:44
Dynamo-Python
# collection of Dynamo Python functions.
# credits: archi-lab, MEPover, Bimorph, Clockwork, Rhythm and many more
@kauffmanes
kauffmanes / install_anaconda.md
Last active July 18, 2024 21:15
Install Anaconda on Windows Subsystem for Linux (WSL)

Thanks everyone for commenting/contributing! I made this in college for a class and I no longer really use the technology. I encourage you all to help each other, but I probably won't be answering questions anymore.

This article is also on my blog: https://emilykauffman.com/blog/install-anaconda-on-wsl

Note: $ denotes the start of a command. Don't actually type this.

Steps to Install Anaconda on Windows Ubuntu Terminal

  1. Install WSL (Ubuntu for Windows - can be found in Windows Store). I recommend the latest version (I'm using 18.04) because there are some bugs they worked out during 14/16 (microsoft/WSL#785)
  2. Go to https://repo.continuum.io/archive to find the list of Anaconda releases
  3. Select the release you want. I have a 64-bit computer, so I chose the latest release ending in x86_64.sh. If I had a 32-bit computer, I'd select the x86.sh version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose `Anaconda3-5.2.0-Li
@giobel
giobel / *Revit to CAD Shared Coordinates*
Last active November 4, 2021 19:10
Viewport To CAD
Helpers to export sheets from Revit to Autocad in shared coordinates
@johnpierson
johnpierson / GetModelElements.py
Last active July 15, 2024 17:54
This is a python script for Dynamo that allows you to collect all model elements in a Revit model.
#license https://choosealicense.com/licenses/bsd-3-clause/
import clr
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
# Import RevitAPI
clr.AddReference("RevitAPI")