Skip to content

Instantly share code, notes, and snippets.

View bbg's full-sized avatar
👍
"Our true mentor in life is science."   Mustafa Kemal Atatürk

Batuhan Göksu bbg

👍
"Our true mentor in life is science."   Mustafa Kemal Atatürk
View GitHub Profile
@bbg
bbg / sublime.json
Created June 14, 2019 08:50
Sublimetext Preferences
{
"always_show_minimap_viewport": false,
"caret_extra_bottom": 4,
"caret_extra_top": 4,
"caret_extra_width": 2,
"caret_style": "smoth",
"close_windows_when_empty": true,
"color_scheme": "Packages/Theme - Naboo/Monokai Naboo.tmTheme",
"dpi_scale": 1,
"draw_minimap_border": true,
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/magento/
ServerName example.com
ServerAlias www.example.com
<Directory /var/www/html/magento/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
@bbg
bbg / vsftpd.conf
Created March 5, 2019 18:36
vsftpd.conf
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
@bbg
bbg / log.go
Created January 8, 2019 15:38 — forked from border/log.go
Log Example For Go
package utils
import (
"log"
"os"
)
var (
Log *log.Logger
)
@bbg
bbg / README.md
Created July 14, 2018 08:58 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@bbg
bbg / function.js
Created July 9, 2018 12:58
javascript functions 4 ways
// function declaration
function square(x) {
return x * x;
}
// function expression
const square = function(x) {
return x * x;
}
@bbg
bbg / main.go
Created June 16, 2018 10:39 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@bbg
bbg / app.cr
Created June 10, 2018 12:48 — forked from cjgajard/app.cr
Kemal controllers pattern
# src/{{app_name}}.cr
require "kemal"
require "./controllers/*"
alias Env = HTTP::Server::Context # this could be provided by Kemal
module Main
get "/", &->index(Env)
get "/:name", &->greet(Env)
end
@bbg
bbg / filex.cr
Created May 26, 2018 21:07
Some Crystal File add-ons
module FileX
def self.mount?(path)
begin
stat_path = File.lstat(path)
rescue Errno
# It doesn't exist so not a mount point
return false
end
# A symlink can never be a mount point
@bbg
bbg / build.gradle
Last active April 19, 2018 11:32
moses
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
}
}
}
}