Skip to content

Instantly share code, notes, and snippets.

View techiediaries's full-sized avatar

Techiediaries (Now 10xdev.blog) techiediaries

View GitHub Profile
<style>
input {
width: 100%;
padding: 2px 5px;
margin: 2px 0;
border: 1px solid red;
border-radius: 4px;
box-sizing: border-box;
}
@techiediaries
techiediaries / php-upload-file.php
Created March 6, 2019 20:06
PHP Upload File Script
<?php
header('Content-Type: application/json; charset=utf-8');
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: PUT, GET, POST");
$response = array();
$upload_dir = 'uploads/';
$server_url = 'http://127.0.0.1:8000';
@techiediaries
techiediaries / login.component.css
Created January 25, 2019 21:43
Login Form CSS
/* 'Open Sans' font from Google Fonts */
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);
.login {
width: 400px;
margin: 16px auto;
font-size: 16px;
}
@techiediaries
techiediaries / register.component.css
Created January 24, 2019 15:53
Register Form CSS
.container {
background:rgba(2, 60, 117, 0.5);
border-radius: 5px;
box-shadow: 0 1.5px 0 0 rgba(0,0,0,0.1);
width:409px;
display: flex;
flex-direction: column;
}
.logo{
@techiediaries
techiediaries / login.component.css
Created January 24, 2019 15:45
Login form CSS example
.container {
background:rgba(2, 60, 117, 0.5);
border-radius: 5px;
box-shadow: 0 1.5px 0 0 rgba(0,0,0,0.1);
width:409px;
display: flex;
flex-direction: column;
}
.logo{
const utils = require("../index.js");
describe("MyJSUtilities", function () {
describe("/String Utils", function () {
let stringToRepeat;
let repeatedString;
beforeEach(function(){
stringToRepeat = "hello";
async function fibonacci(n){
if (n < 0) throw new Error('must be 0 or greater');
if (n === 0) return 0;
if (n === 1) return 1;
return await fibonacci(n - 1) + await fibonacci(n - 2);
}
function isPrime(num){
for (let i = 2; i < num; i++)
if (num % i === 0) return false;
it("should explicitly fail", function () {
fail('Forced to fail');
});
it("should explicitly fail", function () {
fail('Forced to fail');
});
it('it should throw a TypeError', function () {
expect(throwsError).toThrowError(TypeError);
});