Skip to content

Instantly share code, notes, and snippets.

View erkantaylan's full-sized avatar
🍇

erkan erkantaylan

🍇
  • TURKEY
  • 02:16 (UTC +03:00)
View GitHub Profile
ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'
@erkantaylan
erkantaylan / php5-nginx-default.conf
Created November 13, 2014 17:11
php5-nginx default config file [sites-available]
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
server_name localhost;
location / {
<embed wmode="transparent" src="http://www.xatech.com/web_gear/chat/chat.swf" quality="high"
width="720" height="550"
name="chat" FlashVars="id=6" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
pluginspage="http://xat.com/update_flash.php" />
@erkantaylan
erkantaylan / markdown
Last active August 29, 2015 14:19
markdown pdf
https://guides.github.com/features/mastering-markdown/#examples
https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf
//main.js
var cm = require("sdk/context-menu");
var item = cm.Item({
label: "Search on google",
data: "MyId",
//context: cm.PageContext()
//context: cm.URLContext(["*.mozilla.org","*.reddit.com"])
//context: cm.SelectionContext()
//silly.js
function sumNumbers(a, b){
return a+b;
}
function sumNumbersAsync(a, b, callback){
var result = a + b;
callback(result);
}
@erkantaylan
erkantaylan / dota_2_graph_options
Last active August 29, 2015 14:23
Dota 2 net_graph options
For 1920x1080 resolution: (thanks Raccoonix from the comments)
net_graphheight 64
net_graphinsetbottom 437
net_graphinsetleft 0
net_graphinsetright -30
net_graphpos 1
net_graphproportionalfont 0
net_graphtext 1
@erkantaylan
erkantaylan / self_destroy_program
Created June 24, 2015 12:30
C#, self destroy, kendini silen exe
public void SelfDestroy()
{
string currentPath = Environment.CurrentDirectory;
string programName = Process.GetCurrentProcess().ProcessName;
string path = string.Format(@"{0}\{1}", currentPath, programName);
Process.Start(new ProcessStartInfo()
{
Arguments = string.Format("/C choice /C Y /N /D Y /T 3 & Del \"{0}\"", path),
using System;
using System.Collections;
using System.Configuration.Install;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.ServiceProcess;
using System.Windows.Forms;
using Microsoft.Win32;
using System.Management;
using System.Security.Cryptography;
using System.Text;
namespace Test_CSharp_Console
{
/// <summary>
/// Generates a 16 byte Unique Identification code of a computer
/// Example: 4876-8DB5-EE85-69D3-FE52-8CF7-395D-2EA9
/// </summary>