Skip to content

Instantly share code, notes, and snippets.

View joaowiciuk's full-sized avatar
🏠
Working from home

João Wiciuk joaowiciuk

🏠
Working from home
View GitHub Profile
@KireinaHoro
KireinaHoro / query_files.go
Last active May 4, 2021 16:11
Query Google Drive files with Golang
// slice of dictates for query
var q []string
//q = append(q, fmt.Sprintf("mimeType='%s'", driveFolderType))
//q = append(q, "name='Uncategorized'")
//q = append(q, "('0B9P4nJCkns_fWERqT3dfVENHMXM' in parents)")
q = append(q, "trashed=false")
q = append(q, "(name contains 'VCB')")
// construct the call for listing the requested files
listCall := srv.Files.List().PageSize(10).
@MWins
MWins / project-ideas01.md
Last active June 27, 2024 21:55
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.

@danesparza
danesparza / exec.go
Last active June 28, 2023 20:41
Go exec.Command example
package main
import (
"bytes"
"fmt"
"os/exec"
"strings"
)
func main() {
@xeoncross
xeoncross / smoothing.go
Created February 9, 2017 18:37
Peak detection "Smoothed z-score algo" (in Golang) from http://stackoverflow.com/a/22640362/99923
/*
Settings (the ones below are examples: choose what is best for your data)
set lag to 5; # lag 5 for the smoothing functions
set threshold to 3.5; # 3.5 standard deviations for signal
set influence to 0.5; # between 0 and 1, where 1 is normal influence, 0.5 is half
*/
// ZScore on 16bit WAV samples
func ZScore(samples []int16, lag int, threshold float64, influence float64) (signals []int16) {
//lag := 20
@noelboss
noelboss / git-deployment.md
Last active June 12, 2024 00:28
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@elliotlarson
elliotlarson / color-go-test.bash
Last active August 3, 2018 23:11
Colorizing Golang Test Output
#!/bin/bash
# Colorizing Go test output:
# This is meant to be used in place of `go test`. Provided this script is in
# your PATH, calling `color-go-test` will call through to `go test` and then
# colorize and reformat the output.
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
YELLOW=$(tput setaf 3)
@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@Wollw
Wollw / adc_example.c
Created April 16, 2012 06:00
ATmega328P ADC conversion example
/* A simple ADC example that checks the analog reading on ADC0 and turns
* an LED on if the reading is higher than a threshold value and turns if
* off if it is under that value. */
#include <avr/io.h>
#include <stdint.h>
/* Which analog pin we want to read from. The pins are labeled "ADC0"
* "ADC1" etc on the pinout in the data sheet. In this case ADC_PIN
* being 0 means we want to use ADC0. On the ATmega328P this is also
* the same as pin PC0 */
@andrei-m
andrei-m / levenshtein.js
Last active January 12, 2024 23:00
Levenshtein distance between two given strings implemented in JavaScript and usable as a Node.js module
/*
Copyright (c) 2011 Andrei Mackenzie
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE