Skip to content

Instantly share code, notes, and snippets.

View isair's full-sized avatar

Baris Sencan isair

View GitHub Profile
@isair
isair / svg2png.ts
Last active July 20, 2020 11:34
ts-node script for converting all SVG files in a directory to @1x @2x @3x PNG files, files are processed in parallel for optimal performance
import path from 'path';
import { exec } from 'child_process';
import fse from 'fs-extra';
import glob from 'glob-promise';
import pLimit from 'p-limit';
const imagesPath = path.resolve('./assets/svg');
const outputPath = path.resolve('./assets/images');
const concurrency = 2; // File count only. Actual parallelism is three times this.
@pich4ya
pich4ya / padbuster_macos2019.txt
Created August 5, 2019 08:22
Install PadBuster on macOS Mojave 10.14.5
brew install openssl
brew install perl
brew unlink perl && brew link perl
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" perl -MCPAN -e 'install Crypt::SSLeay'
git clone https://github.com/GDSSecurity/PadBuster && cd PadBuster
perl padbuster.pl "https://example.local/ScriptResource.axd?d=yyy" yyy 16 -encoding 3 -bruteforce -log -verbose -cookies "ASP.NET_SessionId=xxx"
@npearce
npearce / install-docker.md
Last active November 11, 2024 13:09
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@FullStackForger
FullStackForger / .gitattributes
Last active July 5, 2023 17:59 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
# Unity
*.cginc text
*.cs diff=csharp text
*.shader text
# Unity YAML
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@j-j-m
j-j-m / commonprofile.metal
Created May 8, 2017 00:20
Can't access GL Uniforms in Metal shader modifier? Apple docs for SCNShadable written in terms of GL? Pulling your hair out?... this will help.
////////////////////////////////////////////////
// CommonProfile Shader v2
#import <metal_stdlib>
using namespace metal;
#ifndef __SCNMetalDefines__
#define __SCNMetalDefines__
@gagarine
gagarine / install-clamav-osx.md
Last active October 1, 2024 20:38
Howto Install clamav on OSX with brew

Howto Install clamav on OSX with brew

Note: on legacy intel system the path may be /usr/local/etc/clamav instead of /opt/homebrew/etc/clamav/

$ brew install clamav
$ cd /opt/homebrew/etc/clamav/
$ cp freshclam.conf.sample freshclam.conf
@nemotoo
nemotoo / .gitattributes
Last active October 14, 2024 00:03
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@nak1114
nak1114 / install-rbenv-win.bat
Last active June 19, 2023 08:44
Batch for install rbenv-win (require windows Vista+)
@echo off
setlocal
rem Set your rbenv directry
set instpath="%USERPROFILE%\.rbenv-win"
rem Clone git repositry
call git clone https://github.com/nak1114/rbenv-win.git %instpath%
rem Config path

How you can help reduce node_modules bloat

This recent reddit thread reveals discontent among the web development community about the sheer volume of stuff in a typical node_modules dir. 140MB in this case!

Is it a design flaw in npm?

Opinions in the thread varied from "I'm surprised npm even works" to "everything is fine". I'm not going to offer an opinion, just these two observations:

  1. node_modules dirs typically do contain lots of stuff that doesn't need to be there.
  2. The latest version mitigates overall size by flattening the dependency tree, but some of the bloat is beyond npm's control.
@dbapl
dbapl / git-rename.sh
Last active January 19, 2018 19:01 — forked from knu/gist:111055
How to mass-rename tags and push them with Git
# Rename tags named 1.X.X to 1.0X.X and push the tag changes
git tag -l | grep 1. | while read t; do n="1.0${t#*.}"; echo $n; git tag $n $t; git push --tags ; git tag -d $t; git push origin :refs/tags/$t ; done