Skip to content

Instantly share code, notes, and snippets.

View firatkucuk's full-sized avatar
🍉

Fırat Küçük firatkucuk

🍉
View GitHub Profile
@firatkucuk
firatkucuk / interfaces.conf
Last active August 29, 2015 13:56
Standard Linux Network Configuration
# sample /etc/network/interfaces file
# local network
auto lo
iface lo inet loopback
# Auto-start Network with Static IP
auto eth0
iface eth0 inet static
address 192.168.1.11
@firatkucuk
firatkucuk / hostapd.conf
Created February 3, 2014 19:37
Linux Sample Access Point Configuration File
# Name of the Wi-Fi interface
interface=wlan0
# Hostapd driver
driver=nl80211
# Wi-Fi Properties
ssid=myhotspot
# Set access point harware mode to 802.11g
hw_mode=g
# Set WIFI channel (can be easily changed)
@firatkucuk
firatkucuk / hotspot-dhcp
Created February 3, 2014 19:41
Linux dnsmasq dhcp settings for hotspot
bind-interfaces
interface=wlan0
dhcp-range=192.168.150.2,192.168.150.20
@firatkucuk
firatkucuk / start-hotspot.sh
Created February 3, 2014 19:58
Start hotspot shell script
#!/bin/bash
# Configure IP address for WLAN
sudo ifconfig wlan0 192.168.150.1
# Start DHCP/DNS server
sudo service dnsmasq restart
# Enable routing
sudo sysctl net.ipv4.ip_forward=1
# Enable NAT
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
@firatkucuk
firatkucuk / sinon_mock.js
Last active August 29, 2015 14:12
sinon.js mock usage
'use strict';
var sinon = require('sinon');
var assert = require('assert');
var testObject = {
'testMethod': function () {
return 'testtest';
}
@firatkucuk
firatkucuk / sinon_stub.js
Last active August 29, 2015 14:12
sinon.js stub usage
'use strict';
var sinon = require('sinon');
var assert = require('assert');
var testObject = {
'testMethod': function () {
return 'testtest';
}
@firatkucuk
firatkucuk / sinon_spy.js
Created January 4, 2015 20:48
sinon.js spy usage
'use strict';
var sinon = require('sinon');
var assert = require('assert');
var testObject = {
'testMethod': function () {
return 'testtest';
}
WITH filtered_tag_log AS (
SELECT
data_value,
logtime,
logtime / (60 * 60 * 1000) log_hour
FROM
tag_log
WHERE
tag_id = 1
AND
@firatkucuk
firatkucuk / detect_malicious_code.sh
Created May 10, 2016 22:08
Malicious PHP code detection
grep -r "base64_decode" --include=*.php [TARGET]
grep -r "eval" --include=*.php [TARGET]
grep -E -r "[a-zA-Z0-9+]{20,}" --include=*.php [TARGET]
@firatkucuk
firatkucuk / tez.vim
Created August 2, 2016 19:39
Yüksek lisans tezi vim script dosyası
if exists("b:current_syntax")
finish
endif
syntax region tezYapilacak start="\[YAPILACAK:" end="\]"
hi def link tezYapilacak Label
"highlight tezYapilacak ctermbg=magenta