Skip to content

Instantly share code, notes, and snippets.

View caiofcm's full-sized avatar
🎯
Focusing

Caio Curitiba Marcellos caiofcm

🎯
Focusing
View GitHub Profile
@fworks
fworks / install-zsh-windows-git-bash.md
Last active May 10, 2024 15:46
Zsh / Oh-my-zsh on Windows Git Bash
@rdbisme
rdbisme / install_bmcage_odes.sh
Last active September 6, 2019 10:57
Install python wrapper for SUNDIALS on Ubuntu
# This script compiles SUNDIALS and install the python wrapper bmcage.odes
# You can also run it directly from the Internet doing
# curl -s https://gist.githubusercontent.com/rubendibattista/468979a4ef509394c70c8286bf9d8e4e/raw/install_bmcage_odes.sh | sudo bash
apt-get update
apt-get upgrade
apt-get install --assume-yes wget python python-dev cmake liblapack-* python-virtualenv virtualenvwrapper
wget https://computation.llnl.gov/projects/sundials/download/sundials-2.7.0.tar.gz
@asroy
asroy / Debugging Mixed Python C++ code in Visual Studio Code
Last active August 25, 2022 17:43
Debugging Mixed Python/C++ code in Visual Studio Code
I've tested it on Fedora 23 and Ubuntu 16.04. I'm using gcc-5.3.1, python-3.4, VS Code-1.14.0
You can debug mixed Python/C++ in the same GUI. It also works for MPI applications. You can switch between the debuggers and corresponding call stacks.
1. Packages needed
1) Visual Studio Code
2) Extensions for VS Code:
"Python" from Don Jayamanne (I'm using 0.6.7)
This allows VS Code act as the front end to debug python.
This gives VS Code ability to attach to a python script that uses module "ptvsd".
@MFry
MFry / .bash_profile
Created January 11, 2017 01:49
Fixing global npm installed modules for git bash
# This file is optional and included for completion sake
# if you generate the appropriate .bashrc file and load git-bash this file will be automatically created.
# generated by Git for Windows
test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@ViktorQvarfordt
ViktorQvarfordt / trello-mathjax.user.js
Last active January 22, 2019 18:18
Apply Mathjax to Trello
// ==UserScript==
// @name MathJax Trello
// @description Apply Mathjax to Trello
// @include https://trello.com/*
// @grant none
// ==/UserScript==
// INSTALL: https://gist.githubusercontent.com/ViktorQvarfordt/c3f89c3cf50e3dc60b23257294af5710/raw/trello-mathjax.user.js
if (window.MathJax === undefined) {
@TotallyInformation
TotallyInformation / README.md
Created August 20, 2016 12:34
Node Dashboard: How to access the msg object in a Template script

Introduction

node-red-dashboard provides an easy to access web UI for Node-Red. It uses Angular, Angular Material and JQuery all of which are available to work with. Most of the available nodes are fairly simple to use but the Template node is available to use for those times when the simple nodes are not enough. Using the Template node can be easy, see the documentation. However, it can get difficult very quickly.

I put this flow together to illustrate how to access the msg object that is passed to the Template node from a JavaScript block within the template. This gives you access to the msg object in the browser.

How things work

Node that interactions with the Dashboards you create happen in two parts. The first is when you initially load the Dashboard UI. This is a single page app (SPA) so all of the Dashboard nodes you've used will all contribute to the UI. You will

@yourcelf
yourcelf / tex-conversions.py
Created July 22, 2013 17:39
Convert utf-8 encoded unicode characters to latex escape sequences. I use this for pre-processing bibtex exports from zotero. Usage: tex-conversions.py infile > outfile
# Obtained from http://code.activestate.com/recipes/252124-latex-codec/
latex_equivalents = {
0x0009: ' ',
0x000a: '\n',
0x0023: '{\#}',
0x0026: '{\&}',
0x00a0: '{~}',
0x00a1: '{!`}',
0x00a2: '{\\not{c}}',
0x00a3: '{\\pounds}',
@cobyism
cobyism / gh-pages-deploy.md
Last active May 17, 2024 10:22
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).