Skip to content

Instantly share code, notes, and snippets.

import "errors"
var (
errorNotFound = errors.New("Cache Datası Bulunamadı: ")
errorEmptyKey = errors.New("Key Boş Olamaz")
)
// MemoryCache In memory'de data saklama sınıfı
type MemoryCache struct {
data map[string][]byte
// Cache interface
type Cache interface {
// Name cache provider adını döndürecek
Name() string
// Set cache'e data kaydeder
Set(key string, data []byte) error
// Get cache'ten data alır
Get(key string) ([]byte, error)
}
package main
import "errors"
import "fmt"
var (
errorNotFound = errors.New("Cache Datası Bulunamadı: ")
errorEmptyKey = errors.New("Key Boş Olamaz")
)
@s4l1h
s4l1h / zimbra
Last active August 1, 2016 09:02
zimbra
zmtlsctl both
zmprov -l gs `zmhostname` | grep -i port
zmprov ms `zmhostname` zimbraMailPort 80
zmprov ms `zmhostname` zimbraMailProxyPort 8080
zmprov ms `zmhostname` zimbraMailSSLPort 443
zmprov ms `zmhostname` zimbraMailSSLProxyPort 8443
@s4l1h
s4l1h / debian-jessie-php5.6-zts-pthreads-mongo.md
Last active May 13, 2022 15:28
Installing PHP 5.6 ZTS enabled & Composer
  1. Installing dependencies
#Date
dpkg-reconfigure tzdata
#Locales
dpkg-reconfigure locales

apt-get update
apt-get install memcached ntp
apt-get install build-essential git libssl-dev libxml2-dev libcurl4-openssl-dev autoconf libicu-dev curl
@s4l1h
s4l1h / gist:301080bf31daf5202f70
Last active August 29, 2015 14:20
RASPBERRY PI ARCH
#!/bin/bash
# Packages required
# dosfstools parted
# Can be run on any Linux system
# loop.max_part=15 must be in kernel cmdline (cmdline.txt for rpi)
# then reboot
echo "creating image to fit on 2Gb card"
dd if=/dev/zero of=arch-rpi.img bs=1M count=1850
[4249:4249:0423/210628:ERROR:process_singleton_linux.cc(983)] Failed to extract pid from path: /home/linaro/.config/chromium/SingletonLock
[4249:4249:0423/210629:ERROR:desktop_window_tree_host_x11.cc(1229)] Not implemented reached in void views::DesktopWindowTreeHostX11::MapWindow(ui::WindowShowState)
[4249:4249:0423/210630:ERROR:fullscreen_aura.cc(15)] Not implemented reached in bool IsFullScreenMode()
Fontconfig warning: ignoring C.UTF-8: not a valid language tag
linaro@linaro-alip:~$ cat /etc/issue.net
Linaro 14.04
linaro@linaro-alip:~$ chromium-browser --version
pcm.!default {
type hw
card 1 #change to 0 to use HP, 1 HDMI
}
ctl.!default {
type hw
card 1 #change to 0 to use HP, 1 HDMI
}
@s4l1h
s4l1h / setenv.GOPATH.plist
Created March 22, 2015 19:08
launchctl load -w /Library/LaunchDaemons/setenv.GOPATH.plist;launchctl load -w /Library/LaunchDaemons/setenv.GOROOT.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>setenv.GOPATH</string>
<key>ProgramArguments</key>
<array>
<string>/bin/launchctl</string>
<string>setenv</string>
@s4l1h
s4l1h / karabiner-import.sh
Created March 19, 2015 02:23
Apple olmayan klavye için ayarlar. Windows klavye ve hackingtosh kullananlara.
#!/bin/sh
cli=/Applications/Karabiner.app/Contents/Library/bin/karabiner
$cli set remap.find_winstyle_no_term 1
/bin/echo -n .
$cli set remap.optionL2commandL 1
/bin/echo -n .
$cli set remap.controlL2commandL 1
/bin/echo -n .