Skip to content

Instantly share code, notes, and snippets.

View hasantayyar's full-sized avatar
⌨️
AFK

Hasan Tayyar Beşik hasantayyar

⌨️
AFK
View GitHub Profile
@yetithefoot
yetithefoot / stuns
Last active April 2, 2024 10:49 — forked from zziuni/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@julionc
julionc / 00.howto_install_phantomjs.md
Last active April 26, 2024 09:13
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
<?php
// fetch the Firmata board depending on the configuration
$board = include(__DIR__.'/bootstrap.php');
// Carica Chip is used
use Carica\Chip as Chip;
// and http from Carica Io
use Carica\Io\Network\Http as Http;
$board
@andyj
andyj / html_for_international_calling coes.htm
Created October 22, 2013 21:57
HTML <select> international calling codes for each country
<!-- country codes (ISO 3166) and Dial codes. -->
<select name="countryCode" id="">
<option data-countryCode="GB" value="44" Selected>UK (+44)</option>
<option data-countryCode="US" value="1">USA (+1)</option>
<optgroup label="Other countries">
<option data-countryCode="DZ" value="213">Algeria (+213)</option>
<option data-countryCode="AD" value="376">Andorra (+376)</option>
<option data-countryCode="AO" value="244">Angola (+244)</option>
<option data-countryCode="AI" value="1264">Anguilla (+1264)</option>
<option data-countryCode="AG" value="1268">Antigua &amp; Barbuda (+1268)</option>
#!/usr/bin/env python
"""
usage
python scroble.py <artist> <song> <timestamp>
"""
import sys
import time
import pylast
@willurd
willurd / web-servers.md
Last active May 14, 2024 01:37
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@algal
algal / nginx-cors.conf
Created April 29, 2013 10:52
nginx configuration for CORS (Cross-Origin Resource Sharing), with an origin whitelist, and HTTP Basic Access authentication allowed
#
# A CORS (Cross-Origin Resouce Sharing) config for nginx
#
# == Purpose
#
# This nginx configuration enables CORS requests in the following way:
# - enables CORS just for origins on a whitelist specified by a regular expression
# - CORS preflight request (OPTIONS) are responded immediately
# - Access-Control-Allow-Credentials=true for GET and POST requests
@afshinm
afshinm / mongodb-singleton.js
Created April 5, 2013 10:57
MongoDb singleton connection in NodeJs
var Db = require('mongodb').Db;
var Connection = require('mongodb').Connection;
var Server = require('mongodb').Server;
//the MongoDB connection
var connectionInstance;
module.exports = function(callback) {
//if already we have a connection, don't connect to database again
if (connectionInstance) {
callback(connectionInstance);
@jedwood
jedwood / sample-test-1.js
Last active July 4, 2016 23:55
API Testing Example - Part 1
describe('Authentication', function() {
it('errors if wrong basic auth', function(done) {
api.get('/blog')
.set('x-api-key', '123myapikey')
.auth('incorrect', 'credentials')
.expect(401, done)
});
it('errors if bad x-api-key header', function(done) {