Skip to content

Instantly share code, notes, and snippets.

View loiane's full-sized avatar

Loiane Groner loiane

View GitHub Profile
import { Component, Input, AfterViewInit } from '@angular/core';
import { NgModel, DefaultValueAccessor, NgControl } from '@angular/forms';
import { Http, Headers, RequestOptions } from '@angular/http';
@Component({
selector: 'app-file-uploader',
template: '<input type="file" (change)="updated($event);">',
providers: [NgModel, DefaultValueAccessor]
})
export class FileUploaderComponent implements AfterViewInit {
@ErickWendel
ErickWendel / youtube-video-analytics.js
Created September 16, 2021 20:00
Example of how to get video views from youtube
const YOUTUBE_KEY = "YOUR YOUTUBE KEY"
import axios = from 'axios';
function getVideoId(link) {
const videoId = link.match(/v=(?<videoId>.*)/)?.groups?.videoId
return videoId
}
async function getVideoViews(link) {
const videoId = getVideoId(link)
@ErickWendel
ErickWendel / gde-post-contribution.js
Last active March 8, 2023 13:02
Example of how to automate contribution submissions on GDE API
const axios = require('axios')
class GDEAPI {
constructor({ token }) {
this.token = token
}
async submitContributions(body) {
const headers = {
"accept": "application/json, text/plain, */*",
"accept-language": "en-US,en;q=0.9",
@peas
peas / linkedin.js
Last active January 26, 2024 19:00
linkedin script da loiane pra aprovar amizades massivamente
x = document.getElementsByClassName('artdeco-button--secondary'); for (let i=0 ; i<50; i++) x[i].click();
// falta paginacao e aceitar >100 numa tacada :P
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active March 26, 2024 23:40
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k