Skip to content

Instantly share code, notes, and snippets.

View danielnegri's full-sized avatar
Coffee first.

Daniel Negri danielnegri

Coffee first.
View GitHub Profile
@danielnegri
danielnegri / CandleForca.src
Last active March 25, 2024 22:08
Candle Forca (Nelogica Profit)
var
reference : float;
touchedMME9 : Boolean;
touchedMMA20 : Boolean;
hasVolume : Boolean;
hasBody : Boolean;
isUpBar : Boolean;
mustPlotRange : Boolean;
begin
reference := MediaExp(20,TrueRange);
Lista Filmes
http://bit.do/jorgedejorge_maisfilmes
http://bit.do/BoxFilmesSD
http://bit.do/jorgedejorge_filmes
http://bitly.com/jorgedejorge_subs
Lista Canais TV
http://bit.ly/JC-CANAIS
@danielnegri
danielnegri / swing.tpl
Created October 13, 2023 20:22
MetaTrader5 - Swing Blue - Chart Template
<chart>
id=128968168864101562
symbol=PETR4
description=PETROBRAS PN N2
period_type=1
period_size=1
digits=5
tick_size=0.000000
position_time=1612936800
scale_fix=0
@danielnegri
danielnegri / makefile-autocomplete.bash
Created October 2, 2023 18:37
Makefile Autocomplete
# Makefile Auto-complete
function _makefile_targets {
local curr_arg;
local targets;
# Find makefile targets available in the current directory
targets=''
if [[ -e "$(pwd)/Makefile" ]]; then
targets=$( \
grep -oE '^[a-zA-Z0-9_-]+:' Makefile \
@danielnegri
danielnegri / settings.json
Last active February 10, 2023 18:04
Visual Studio Code
// Place your settings in this file to overwrite the default settings
{
"workbench.iconTheme": "material-icon-theme",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"editor.fontFamily": "JetBrains Mono, Consolas, 'Courier New', monospace",
"editor.fontSize": 14,
"editor.fontWeight": "300",
"editor.lineHeight": 24,
"editor.letterSpacing": 0.5,
@danielnegri
danielnegri / qemu_ubuntu.md
Created November 8, 2022 01:48 — forked from Jatapiaro/qemu_ubuntu.md
How to install QEMU on OSX and install an Ubuntu VM

Install QEMU on OSX

QEMU requires brew in OSX, so we need to install brew first.

Installing Brew

To install brew we need to have the developer tools enabled in our system. In order to install those tools, we have two options.

  1. Download Xcode form the AppStore
  2. In your terminal run the following command: xcode-select --install
@danielnegri
danielnegri / .tmux.conf
Created April 5, 2022 00:32
$HOME/.tmux.conf
#set -g default-terminal "screen-256color"
# change prefix command to C-z
set -g prefix C-z
unbind C-b
bind C-z last-window
bind z send-prefix
# Turn on mouse support
setw -g mouse on
@danielnegri
danielnegri / alacritty.yml
Created April 5, 2022 00:09
$HOME/.config/alacritty/alacritty.yml
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
@danielnegri
danielnegri / README.md
Created June 4, 2012 15:43
LastFM - Ranking

Exercise

Description

The attached utf-8 encoded text file contains the favorite musical artists of 1000 users from LastFM. Each line is a list of up to 50 artists, formatted as follows:

  • Radiohead, Pulp, Morrissey, Delays, Stereophonics, Blur, Suede, Sleeper, The La's, Super Furry Animals
  • Band of Horses, Iggy Pop, The Velvet Underground, Radiohead, The Decemberists, Morrissey, Television

Write a program that, using this file as input, produces a list of pairs of artists which appear TOGETHER in at least fifty different lists. For example, in the above sample, Radiohead and Morrissey appear together twice, but every other pair appears only once. Your program should output the pair list to stdout in the same form as the input.

@danielnegri
danielnegri / tmuxfixer.js
Created July 24, 2020 14:19 — forked from maxdavid/tmuxfixer.js
Simple script for updating tmux config files, converting deprecated -fg, -bg, and -attr options to the combined -style option
#!/usr/bin/env node
/*
tmuxfixer.js
USAGE:
$ node tmuxfixer.js old-conf-path [new-conf-path]
PURPOSE & CONTEXT: This script takes in a tmux configuration file and combines
all deprecated -fg, -bg, and -attr into a single -style option line.