Skip to content

Instantly share code, notes, and snippets.

metude metude

Block or report user

Report or block metude

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@metude
metude / random-tc-number.js
Created Apr 1, 2014
Rastgele TC Kimlik No Javascript
View random-tc-number.js
var num = Math.floor((Math.random()*999999999)+100000000);
console.log("random number: " + num);
var str = num.toString();
var num_array = str.split("");
console.log("number array: " + num_array);
function interesting_rule(num_array) {
var sum_even = parseInt(num_array[1]) + parseInt(num_array[3]) + parseInt(num_array[5]) +parseInt(num_array[7]);
var sum_odd = parseInt(num_array[0]) + parseInt(num_array[2]) + parseInt(num_array[4]) +parseInt(num_array[6]) + parseInt(num_array[8]);
return ((sum_odd*7)-sum_odd)%10;
@metude
metude / gist:4347001
Created Dec 20, 2012
Simple Font Detect with JS (source: http://my.opera.com/QuHno/ )
View gist:4347001
/*********************** Fontdetect - The font stuff - START ********************/
var font = document.getElementById('font'); // The hidden input field
var output = document.getElementById('output'); // the detected font results go here
var fontList =''; // the result
var computed = window.getComputedStyle(output, null); // the actual style of the tested element
@metude
metude / background.js
Created Nov 28, 2012
Opera Extension - Download Chrome
View background.js
window.addEventListener('DOMContentLoaded', function() {
if (opera.contexts.menu) { // Check the Context Menu API is supported
var menu = opera.contexts.menu; // Create a menu item properties object
var itemProps = {
contexts: ['page', 'link'],
icon: 'images/chrome.png',
documentURLPatterns: [
'http://chrome.google.com/webstore/*',
'https://chrome.google.com/webstore/*'
You can’t perform that action at this time.