This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { gregorianToJulian, julianToHijri } from './hijri-util-date.js'; | |
/** | |
* Gregorian to Hijri | |
* * First convert to Julian | |
* * then convert to hijri | |
*/ | |
const futureDate = dayjs('2019-10-24').add(1, 'year'); | |
// .format('YYYY-MM-DD'); | |
const y = futureDate.year(); | |
const d = futureDate.day(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ok": true | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function comvert(num){ | |
var ones = ['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', | |
'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', | |
'seventeen', 'eighteen', 'nineteen']; | |
var tens = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', | |
'ninety']; | |
var numString = num.toString(); | |
if (num < 0) throw new Error('Negative numbers are not supported.'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Number.prototype.pad = function(size) { | |
var s = String(this); | |
while (s.length < (size || 2)) {s = "0" + s;} | |
return s; | |
} | |
(1).pad(3) // => "001" | |
(10).pad(3) // => "010" | |
(100).pad(3) // => "100" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require("fs"); | |
var rmDir = function(dir, rmSelf) { | |
var files; | |
rmSelf = (rmSelf === undefined) ? true : rmSelf; | |
dir = dir + "/"; | |
try { files = fs.readdirSync(dir); } catch (e) { console.log("!Oops, directory not exist."); return; } | |
if (files.length > 0) { | |
files.forEach(function(x, i) { | |
if (fs.statSync(dir + x).isDirectory()) { | |
rmDir(dir + x); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
background: #f09433; | |
background: -moz-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); | |
background: -webkit-linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); | |
background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f09433', endColorstr='#bc1888',GradientType=1 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
display dialog "Set minutes before turning off:" default answer "60" | |
set the time_before_sleep to the text returned of the result | |
delay time_before_sleep * minutes | |
tell the application "Spotify" | |
delay (duration of the current track) - the player position | |
pause | |
end tell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "SIM900.h" | |
#include <SoftwareSerial.h> | |
//If not used, is better to exclude the HTTP library, | |
//for RAM saving. | |
//If your sketch reboots itself proprably you have finished, | |
//your memory available. | |
//#include "inetGSM.h" | |
//If you want to use the Arduino functions to manage SMS, uncomment the lines below. | |
#include "sms.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here You can type your custom JavaScript... | |
let template = '<div class="livepreview-wrapper">' + | |
'<a id="minimizer"><span class="fa fa-minus"></span></a>' + | |
'<a id="copy">Copy To Clipboard</a>' + | |
'<div id="textarea-livepreview" rows="4"></div>' + | |
'</div>'; | |
let style = '<style>#textarea-livepreview { width: 100%; height: 100%; position: relative }</style>' | |
$('body').append(template); | |
$('body').append(style); |
NewerOlder