Skip to content

Instantly share code, notes, and snippets.

@cnra
cnra / minesweeper.cs
Created October 12, 2019 21:54
mayın tarlası minesweeper from https://www.youtube.com/watch?v=01XtKAVS6-s
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using Minesweeper.Properties;
namespace Minesweeper
{
public partial class MinesweeperForm : Form
@cnra
cnra / .gitignore
Created October 11, 2019 11:13
unity gitignore
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
[Ll]ogs/
# Uncomment this line if you wish to ignore the asset store tools plugin
# [Aa]ssets/AssetStoreTools*
@cnra
cnra / tltp.mq5
Last active August 6, 2019 22:00
metatrader 5 take profit / stop loss
input int SL = 150; //15 pip
void OnTradeTransaction(const MqlTradeTransaction &txs, const MqlTradeRequest &req, const MqlTradeResult &res)
{
MqlTradeRequest rq={0};
MqlTradeResult tr;
if (HistoryDealGetInteger(txs.deal, DEAL_ENTRY) == DEAL_ENTRY_IN)
{
PositionSelect(txs.symbol);
rq.position = txs.order;
@cnra
cnra / samba-share.conf
Created July 31, 2019 20:48
samba share definations
======================= Share Definitions =======================
Un-comment the following (and tweak the other settings below to suit)
to enable the default home directory shares. This will share each
user's home directory as \server\username
[Paylasimlar]
path = /home
browsable =yes
writable = yes
guest ok = yes
for iommu_group in $(find /sys/kernel/iommu_groups/ -maxdepth 1 -mindepth 1 -type d); do
echo "IOMMU group $(basename "$iommu_group")";
for device in $(ls -1 "$iommu_group"/devices/); do echo -n $'\t'; lspci -nns "$device";
done;
done
@cnra
cnra / docker-machine static ip.sh
Last active February 24, 2019 19:30
docker machine static ip
docker-machine ssh dev1
echo "ifconfig eth1 192.168.99.100 netmask 255.255.255.0 broadcast 192.168.99.255 up" > /var/lib/boot2docker/bootsync.sh
echo -e 'kill `more /var/run/udhcpc.eth1.pid`\nifconfig eth1 192.168.99.100 netmask 255.255.255.0 broadcast 192.168.99.255 up' > /var/lib/boot2docker/bootsync.sh
docker-machine regenerate-certs dev
https://github.com/docker/machine/issues/1709#issuecomment-169293713
@cnra
cnra / express-basic.js
Created September 27, 2018 09:07
express basic #server
const express = require('express')
const app = express()
const port = 8080
app.get('/', (req, res) => {
js = {}
js.time = new Date();
js.remoteAddress = req.connection.remoteAddress;
js.ip = req.ip;
res.json(js);
@cnra
cnra / Vagrantfile.rb
Last active September 17, 2018 08:59
Vagrantfile Ornek #vagrant
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.network "public_network"
config.vm.synced_folder "d:/code", "/code"
end
#include <iostream>
using namespace std;
class A {
public:
A() { cout << "A yapici\n"; }
A(const A &x) { cout << "A Kopya\n"; }
~A() { cout << "A Yikici\n"; }
};
#include <iostream>
using namespace std;
class TemelSinif{
public:
int fonk1() { return 2; }
virtual int fonk2() { return 4; }
};