Skip to content

Instantly share code, notes, and snippets.

View ilyabrin's full-sized avatar
Go, JavaScript

Ilya Brin ilyabrin

Go, JavaScript
View GitHub Profile
@ilyabrin
ilyabrin / dependency-review.yml
Created September 8, 2022 13:46
Dependency Review Action
name: 'Dependency Review'
on: [pull_request]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
@ilyabrin
ilyabrin / readme.md
Created March 27, 2021 19:57
MacOS nano editor syntax highlighting

1. Install

brew install nano

2. Add alias to ~/.bashrc or ./zshrc

alias nano='/usr/local/bin/nano'

3. Apply changes

source ./zshrc

@maratori
maratori / .golangci.yml
Last active July 21, 2024 10:49
Golden config for golangci-lint
# This code is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021 Marat Reymers
## Golden config for golangci-lint v1.59.1
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt and change it for your needs.
run:
@tajnymag
tajnymag / tinder.user.js
Last active July 7, 2024 15:03
Tinder Deblur Userscript (ARCHIVED and DEPRECATED, see https://github.com/tajnymag/tinder-deblur)
// ==UserScript==
// @name Tinder Deblur
// @namespace Violentmonkey Scripts
// @match https://tinder.com/*
// @grant none
// @version 1.4
// @author Tajnymag
// @downloadURL https://raw.githubusercontent.com/tajnymag/tinder-deblur/main/tinder.user.js
// @description Simple script using the official Tinder API to get clean photos of the users who liked you
// ==/UserScript==
func greyScale(pixels *[][]color.Color) {
ppixels := *pixels
xLen:=len(ppixels)
yLen := len(ppixels[0])
//create new image
newImage:=make([][]color.Color, xLen)
for i:=0;i<len(newImage);i++{
newImage[i] = make([]color.Color,yLen)
}
//idea is processing pixels in parallel
@EduVencovsky
EduVencovsky / Auth.jsx
Last active June 27, 2024 07:58
Private Routes with Auth using react-router and Context API
import React, { useState, useEffect } from 'react'
import PropTypes from 'prop-types'
import { checkIsAuthenticated, authSignUp, authLogin, authLogout } from '../../services/auth'
export const AuthContext = React.createContext({})
export default function Auth({ children }) {
const [isAuthenticated, setIsAuthenticated] = useState(false)
const [isLoading, setIsLoading] = useState(true)
@elifiner
elifiner / -first-last-names.md
Last active April 4, 2024 19:37
List of first names and last names for random data generation

First and last names

This gist has two files in it: first-names.txt and last-names.txt, each with 4096 names taken from some unnamed database.

Useful for generating mock data for testing or for opfuscating production data for testing.

See https://stackoverflow.com/a/50242368/15109 for some thoughts about data obfuscation.

@shanselman
shanselman / Dockerfile
Last active November 10, 2023 19:17
Smarter ASP.NET Core Docker File
FROM microsoft/dotnet:2.0-sdk as builder
RUN mkdir -p /root/src/app/aspnetcoreapp
WORKDIR /root/src/app/aspnetcoreapp
#copy just the project file over
# this prevents additional extraneous restores
# and allows us to resuse the intermediate layer
# This only happens again if we change the csproj.
# This means WAY faster builds!
@asukakenji
asukakenji / 0-go-os-arch.md
Last active July 24, 2024 05:41
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android