Skip to content

Instantly share code, notes, and snippets.

@tosunkaya
tosunkaya / BlinkAll.c
Created May 16, 2020 08:03 — forked from Corinrypkema/BlinkAll.c
Arduino Blink All Pins
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// Pin 11 has the LED on Teensy 2.0
// Pin 6 has the LED on Teensy++ 2.0
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p
#EXTINF:-1,BBC - Radio 2
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio2_mf_p
#EXTINF:-1,BBC - Radio 3
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-aac-lc-a/format/pls/vpid/bbc_radio_three.pls
#EXTINF:-1,BBC - Radio 4
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p
#EXTINF:-1,BBC - Radio 5 live
@tosunkaya
tosunkaya / dijkstra_algorithm.cpp
Created June 11, 2020 13:30 — forked from nateshmbhat/dijkstra_algorithm.cpp
Dijkstra Algorithm for finding shortest path to all vertices from a single source.
#include<bits/stdc++.h>
using namespace std ;
int cost[100][100] , n ;
int getMin(int dist[] , bool visited[]){
int key = 0 ;
int min = INT_MAX ;
for(int i=0;i < n ; i++){
if(!visited[i] && dist[i]<min){
<!-- Modify this according to your requirement -->
<h3>
Redirecting to duckdev.com after <span id="countdown">10</span> seconds
</h3>
<!-- JavaScript part -->
<script type="text/javascript">
// Total seconds to wait
var seconds = 10;
# Block Taboola ads
127.0.0.1 popup.taboola.com
127.0.0.1 www.popup.taboola.com
127.0.0.1 taboola.com
127.0.0.1 www.taboola.com
127.0.0.1 cdn.taboolasyndication.com
127.0.0.1 taboolasyndication.com
127.0.0.1 www.taboolasyndication.com
127.0.0.1 www.cdn.taboolasyndication.com
127.0.0.1 trc.taboola.com
@tosunkaya
tosunkaya / block-csgo-matchmaking-servers.md
Created October 21, 2020 20:42 — forked from jakoch/block-csgo-matchmaking-servers.md
Block all CS:GO MatchMaking Servers (allow only Amsterdam, Frankfurt, London, Luxemburg, Vienna)

Block all CS:GO MatchMaking Servers (allow only Amsterdam, Frankfurt, London, Luxemburg, Vienna)

IPs are taken from github.com/SteamDatabase/SteamTracking/Random/NetworkDatagramConfig.json

Add Firewall Rule to lock servers

netsh advfirewall firewall add rule name="csgo-mm-servers-block" dir=out action=block remoteip=18.162.88.34/32,34.85.12.153/32,34.85.40.62/32,34.85.47.228/32,34.212.218.15/32,42.81.120.140/32,42.81.120.141/32,42.81.120.142/32,42.81.120.143/32,42.81.120.144/32,42.81.120.145/32,61.182.135.15/32,61.182.135.16/32,61.182.135.18/32,61.182.135.72/32,103.10.124.40/32,103.10.124.43/32,103.10.124.44/32,103.10.124.45/32,103.10.124.99/32,103.10.124.100/32,103.10.124.101/32,103.10.124.102/32,103.10.125.146/32,103.10.125.154/32,103.10.125.162/32,111.32.164.141/32,111.32.164.142/32,111.32.164.143/32,111.32.164.144/32,111.32.164.145/32,111.32.164.146/32,116.211.132.11/32,116.211.132.12/32,116.21
1. Fire up the command prompt.
2.1. Execute: gcc shm_server.c -o shm_server
2.2. Execute: gcc shm_client.c -o shm_client
3. Execute: ./shm_server &
4. Execute: ./shm_client
@tosunkaya
tosunkaya / check-website-availability.php
Created May 21, 2021 18:05 — forked from Digiover/check-website-availability.php
PHP/cURL function to check a web site status. If HTTP status is not 200 or 302, or the requests takes longer than 10 seconds, the website is unreachable. See https://www.saotn.org/php-curl-check-website-availability/.
<?php
/**
* PHP/cURL function to check a web site status. If HTTP status is not 200 or 302, or
* the requests takes longer than 10 seconds, the website is unreachable.
*
* Follow me on Twitter: @HertogJanR
*
* @param string $url URL that must be checked
*/
function url_test($url) {
@tosunkaya
tosunkaya / BBC.m3u
Created June 16, 2021 00:16 — forked from random-robbie/BBC.m3u
BBC HLS Streams - let me know if i missed any
#EXTM3U
#EXTINF:-1 tvg-id="BBC One HD" tvg-name="BBC One HD" tvg-logo="https://s4.postimg.org/k5xl5dmf1/bbc_one.png" group-title="BBC",BBC One HD
http://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hls/uk/abr_hdtv/ak/bbc_one_hd.m3u8
#EXTINF:-1 tvg-id="BBC One London" tvg-name="BBC One London" tvg-logo="https://s4.postimg.org/z61nj8qd9/Bbc_london_logo.jpg" group-title="BBC",BBC One London
http://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hls/uk/hls_tablet/ak/bbc_one_london.m3u8
#EXTINF:-1 tvg-id="BBC One Northern Ireland HD" tvg-name="BBC One Northern Ireland HD" tvg-logo="https://s3.postimg.org/ltztuojqr/6y_QROLCn_400x400.png" group-title="BBC",BBC One Northern Ireland HD
http://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hls/uk/abr_hdtv/ak/bbc_one_northern_ireland_hd.m3u8
#EXTINF:-1 tvg-id="BBC One Scotland HD" tvg-name="BBC One Scotland HD" tvg-logo="https://s3.postimg.org/ltztuojqr/6y_QROLCn_400x400.png" group-title="BBC",BBC One Scotland HD
http://a.fi
@tosunkaya
tosunkaya / AndroidUtils.kt
Created July 13, 2021 17:42 — forked from maxost/AndroidUtils.kt
Kotlin: make phone call in Android
fun Context.makePhoneCall(number: String) : Boolean {
try {
val intent = Intent(Intent.ACTION_DIAL, Uri.parse("tel:$number"))
startActivity(intent)
return true
} catch (e: Exception) {
e.printStackTrace()
return false
}
}