Skip to content

Instantly share code, notes, and snippets.

<?php
date_default_timezone_set ( "Asia/Kathmandu" );
$time = time();
$actual_time = date('H:i:s',$time);
echo $actual_time;
if(isset($_POST['user'])){
$openfile = fopen("store.txt","a+");
fwrite($openfile,$rand.',');
}
<?php
date_default_timezone_set ( "Asia/Kathmandu" );
$time = time();
$actual_time = date('D d M Y @H:i:s',$time);
if(isset($_POST['logEntry'])){
$tempMem = $_POST['logEntry'];
$createFile = fopen('dailyLog.txt','a+');
$writeFile = fwrite($createFile, $actual_time.$tempMem);
echo 'Log has been successfully entered into your daily logbook';
}
@aadeshere1
aadeshere1 / applications.css
Created June 19, 2016 05:21
Sass processed to css
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif;
/* 1 */
-ms-text-size-adjust: 100%;
<html>
<head>
<title>Resume</title>
<style>
html{
background-color: #444;
padding: 0 1em;
}
body{
background-color: #FFF;
html {
background-color: #444;
padding: 0 1em;
}
body {
background-color: #FFF;
font-family: monospace;
/*padding: 2em;*/
margin: 1em auto;
@aadeshere1
aadeshere1 / remount.sh
Created November 25, 2017 09:11 — forked from ertseyhan/remount.sh
Temporarily increase size of tmp folder on Arch linux
#!/bin/bash
sudo mount -o remount,size=10G,noatime /tmp
echo "Done. Please use 'df -h' to make sure folder size is increased."
@aadeshere1
aadeshere1 / AD to BS in ruby
Last active August 7, 2018 12:11
Converts AD to BS in batch using hamropatro.com date converter API endpoint.
# HamroPatro might change it's api endopint
require 'rest-client'
require 'loofah'
require 'loofah/helpers'
eng_date = File.readlines('nepdate.txt')
mahina = {"बैशाख" => 1, "जेठ" => 2, "आषाढ" => 3, "श्रावण" => 4,"भाद्र" => 5, "आश्विन" => 6, "कार्तिक" => 7, "मंसिर" => 8, "पौष" => 9, "माघ" => 10, "फाल्गुण" => 11, "चैत्र" => 12}
mahinaharu = Regexp.new(mahina.keys.map {|x| Regexp.escape(x) }.join('|'))
void main() {
var deck = new Deck();
print(deck);
deck.removeCard('Diamonds', 'Ace');
print(deck);
}
class Card {
String rank;
String suit;
arr =[
{
'merchant_id' => '3000',
'service_id' => '1234',
'dtls' => [
{
'dtl1' => [
{
'dtl_rowno' => '1',
'dtl_item_id' => '345',
#!/usr/bin/env ruby
require 'date'
require 'time'
require 'google/apis/calendar_v3'
require 'googleauth'
require 'ap'
class Reminder
attr_reader :date, :time, :message
def initialize(date, time, message)