Skip to content

Instantly share code, notes, and snippets.

View inancgumus's full-sized avatar

İnanç Gümüş inancgumus

View GitHub Profile
@inancgumus
inancgumus / list-repositories-by-stars.md
Last active July 20, 2022 18:42
List repositories by stars (paginated)

Run using the explorer, here.

First Page:

query { 
  topic(name: "go") {
    repositories(first: 100, orderBy: {field: STARGAZERS, direction:DESC}) {
      edges {
 node {
@inancgumus
inancgumus / gist:1dd9080059770a917aae81a58fac529e
Created December 12, 2017 22:39 — forked from scottburton11/gist:3222152
Audio Compression for Voiceover

About compression

Audio compression is used to reduce the dynamic range of a recording. Dynamic range is the difference between the loudest and softest parts of an audio signal. It was originally used to guard against defects when cutting wax and vinyl phonograph records, but generally became useful as a way of increasing the loudness of an audio recording without achieving distortion.

The goal of most compression applications is to increase the amplitude of the softest parts of a recording, without increasing the amplitude of the loudest parts.

Compressor anatomy

Compressors generally all have the same conceptual parts. However, not all compressors present variable controls for all parts to the user. If you don't see all of your compressor's controls here, there's a chance it either has a fixed value (and no control), or is named something else:

@inancgumus
inancgumus / main.go
Last active December 2, 2017 13:39
Interface scanner for Go
/*
non-refactored, hacky tool to extract interfaces.
adopted from https://github.com/campoy/justforfunc/tree/master/24-ast
*/
package main
import (
"fmt"
"go/scanner"
"go/token"
@inancgumus
inancgumus / godev.bash
Created October 29, 2017 22:18
Makes your environment ready for Go contributions
#!/bin/bash
# -----------------------------------------------------------------------------
# HOW TO RUN?
# -----------------------------------------------------------------------------
# . ./godev.bash
# WARNING:
#
@inancgumus
inancgumus / func_overloading_golang.go
Created October 19, 2017 13:13
imitating function overloading in go
package main
import (
"fmt"
)
func main() {
// imitating func overloading in Go
// this example uses this:
// declare constants for the days in a week, and assign to them
// different numeric values.
//
// so, they won't clash. if both values of Sunday and Monday were 0,
// then, how could we know that which one is Sunday or Monday?
//
// this code is for this article: https://blog.learngoprogramming.com/golang-const-type-enums-iota-bc4befd096d3
const (
Sunday = 0
Monday = 1
// https://blog.learngoprogramming.com/golang-const-type-enums-iota-bc4befd096d3
package main
import (
"fmt"
)
const (
Mercury = 3.303e+23
Venus = 4.869e+24
package main
import "fmt"
func main() {
// We can assign an untyped constant to any numeric-type variable
// Numeric types:
var (
package main
import (
"fmt"
)
func main() {
// typed constant declaration
const Pi float64 = 3.14
package main
import (
"fmt"
)
// visible inside main package
const packageLevelConst = 1
// visible everywhere