Skip to content

Instantly share code, notes, and snippets.

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

Eduardo Henrique da Silva Freitas eduardohitek

🏠
Working from home
View GitHub Profile
@ZPascal
ZPascal / hoge.rb
Last active August 18, 2023 14:06 — forked from minamijoyo/hoge.rb
Using GitHubPrivateRepositoryReleaseDownloadStrategy removed in brew v2
require "formula"
require_relative "lib/private_strategy"
class Hoge < Formula
homepage "https://github.com/yourcompany/hoge"
url "https://github.com/yourcompany/hoge/releases/download/v0.1.0/hoge_v0.1.0_darwin_amd64.tar.gz", :using => GitHubPrivateRepositoryReleaseDownloadStrategy
sha256 "6de411ff3e4b1658a413dd6181fcXXXXXXXXXXXXXXXXXXXX"
head "https://github.com/yourcompany/hoge.git"
version "0.1.0"
@ivanrosolen
ivanrosolen / mac_install.md
Last active January 13, 2022 14:37
Mac install script

Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

basic (catalina)

brew install -f git jq jo telnet wget nmap

dev big-sur

brew install -f adr-tools php composer imagemagick ffmpeg exiftool

@rochabianca
rochabianca / vue.json
Last active March 13, 2023 01:17
Snippet to bring back scaffold on vue on vscode. To use it go to Code>Preferences>User Snippets type vue on the input and paste this code there.
{
"bring back the scaffold to vue files": {
"prefix": "scaffold",
"body": [
"<template>",
" <div>$TM_FILENAME_BASE</div>",
"</template>",
"",
"<script>",
"export default {",
package main
import (
"bytes"
"fmt"
"net"
"runtime"
"sync"
"sync/atomic"
"time"
@minamijoyo
minamijoyo / hoge.rb
Last active May 1, 2024 01:30
Using GitHubPrivateRepositoryReleaseDownloadStrategy removed in brew v2
require "formula"
require_relative "lib/private_strategy"
class Hoge < Formula
homepage "https://github.com/yourcompany/hoge"
url "https://github.com/yourcompany/hoge/releases/download/v0.1.0/hoge_v0.1.0_darwin_amd64.tar.gz", :using => GitHubPrivateRepositoryReleaseDownloadStrategy
sha256 "6de411ff3e4b1658a413dd6181fcXXXXXXXXXXXXXXXXXXXX"
head "https://github.com/yourcompany/hoge.git"
version "0.1.0"
require('dotenv').config();
const lg = require('./libs/log');
const express = require('express');
const app = express();
const mainRouter = require('./libs/router');
app.use('/', mainRouter);
let port = process.env.WEB_PORT || 8080;
app.listen(port, function () {
lg.debug('app listening on port %i!', port);
@chrj
chrj / template.service
Created May 4, 2018 14:09
Sample service unit file for systemd
[Unit]
Description=My service
[Service]
ExecStart=/usr/local/bin/my-service \
-argument value \
-otherargument othervalue
# Setuid/Setgid
User=nobody
FROM jwilder/nginx-proxy:alpine
COPY proxy.conf /etc/nginx/conf.d/
@marjanmo
marjanmo / youtube_to_mp3_splitter.py
Last active June 16, 2023 17:46
Download Youtube music compilation into separate .mp3 files
import subprocess
import sys, os
"""
#####################################
##### YOUTUBE TO MP3 SPLITTER ######
#####################################
@posener
posener / go-shebang-story.md
Last active July 26, 2024 01:16
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.