Skip to content

Instantly share code, notes, and snippets.

View ashumeow's full-sized avatar
🎯
Moving Forward

Aswini S ashumeow

🎯
Moving Forward
View GitHub Profile
@ashumeow
ashumeow / plusone.js
Last active November 23, 2023 04:33 — forked from shuhblam/plusone.js
// unminifed version of https://apis.google.com/js/plusone.js
// see https://developers.google.com/+/plugins/+1button/#getting-started
window.___jsl = window.___jsl || {};
window.___jsl.h = window.___jsl.h || 'm;\/_\/apps-static\/_\/js\/gapi\/__features__\/rt=j\/ver=zVTxVnVbJog.en_US.\/sv=1\/am=!FRwcaGMpC1CIJ0aI4g\/d=1\/';
window.___jsl.l = [];
window.___gpq = [];
window.gapi = window.gapi || {};
window.gapi.plusone = window.gapi.plusone || (function () {
function f(n) {
@ashumeow
ashumeow / create_file_Qt
Created May 16, 2018 03:10 — forked from diniremix/create_file_Qt
create file of text in Qt
void MainWindow::createfile(){
QString filename="test.txt";
QFile file(filename);
if(!file.exists()){
qDebug() << "NO existe el archivo "<<filename;
}else{
qDebug() << filename<<" encontrado...";
}
QString mesg="una segunda linea";
if (file.open(QIODevice::WriteOnly | QIODevice::Text)){
@ashumeow
ashumeow / currency.php
Last active January 9, 2018 13:23 — forked from dcblogdev/gist:8067095
Use Google finance calculator to convert currency with php
<?php
function convertCurrency($amount, $from, $to){
$data = file_get_contents("https://finance.google.com/finance/converter?a=$amount&from=$from&to=$to");
preg_match("/<span class=bld>(.*)<\/span>/",$data, $converted);
$converted = preg_replace("/[^0-9.]/", "", $converted[1]);
return number_format(round($converted, 3),2);
}
echo convertCurrency("10.00", "AED", "USD");
?>
@ashumeow
ashumeow / PrimeCheck
Last active January 4, 2016 15:09 — forked from freemo/PrimeCheck.hs
function (isPrime(number))
{
if ((number == 2) || (number == 3))
return true;
if ((number % 2 === 0) || (number % 3 === 0))
return false;
var maxDivisor = Math.sqrt(number);
var dividendIndex = 1;
var dividend = 5;
@ashumeow
ashumeow / index.html
Last active December 28, 2015 03:49 — forked from mbannert/index.html
<!doctype HTML>
<meta charset ="UTF-8">
<html>
<head>
<link rel='stylesheet' type="text/css" href="http://nvd3.org/src/nv.d3.css">
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js' type='text/javascript'></script>
<script src='http://d3js.org/d3.v2.min.js' type='text/javascript'></script>
<script src='http://nvd3.org/nv.d3.js' type='text/javascript'></script>
<script src='http://nvd3.org/lib/fisheye.js' type='text/javascript'></script>
<html>
<body>
<table>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
<tr>
@ashumeow
ashumeow / index.html
Last active December 27, 2015 15:09 — forked from hano/index.html
<!DOCTYPE html>
<html>
<head>
<title>Fernsehturm</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="tower-container">
<div class="antennas">
@ashumeow
ashumeow / .gitconfig
Last active December 27, 2015 14:39 — forked from berlotto/.gitconfig
# user and email config
$ git config user.name "My Name"
$ git config user.email my@email.com
# push
$ git push
#alias
$ git log --oneline
@ashumeow
ashumeow / Modernizer
Last active December 27, 2015 14:29 — forked from anneallen/Modernizer
//Add Modernizer
function eva_modernizer_doctype() {
<!DOCTYPE html>
<html>
<div class="no-js">
<?php language_attributes( 'html' ); ?>>
<head>
<meta charset="UTF-8"> </head>
<?php
}
@ashumeow
ashumeow / header.php
Last active December 27, 2015 14:29 — forked from funteractive/header.php
<?php
echo(wp_title( '|',true,'right') );
bloginfo('name');
?>