Skip to content

Instantly share code, notes, and snippets.

View jdgo-mars's full-sized avatar

João Martins jdgo-mars

View GitHub Profile
@jdgo-mars
jdgo-mars / _mixins.scss
Created December 6, 2015 18:37 — forked from garyharan/_mixins.scss
Useful scss mixins (rounded corners, gradients, text-field, button)
@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
@if $inset {
-webkit-box-shadow:inset $top $left $blur $color;
-moz-box-shadow:inset $top $left $blur $color;
box-shadow:inset $top $left $blur $color;
} @else {
-webkit-box-shadow: $top $left $blur $color;
-moz-box-shadow: $top $left $blur $color;
box-shadow: $top $left $blur $color;
}
@jdgo-mars
jdgo-mars / Head Snippet
Created December 13, 2015 18:20
HTML Snippets
<head>
<!--Meta Information-->
<title>My Website</title>
<meta charset="utf-8">
<!--Mobile Stuff-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" href="mysite-icon-iphone.png">
<link rel="apple-touch-icon" sizes="76x76" href="mysite-icon-ipad.png">
<link rel="apple-touch-icon" sizes="120x120" href="mysite-icon-iphone-retina.png">
/*
Import Packages
*/
var gulp = require('gulp'),
gutil = require('gulp-util'),
jshint = require('gulp-jshint'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
autoprefixer = require('gulp-autoprefixer'),
source = require('vinyl-source-stream'),
@jdgo-mars
jdgo-mars / app.js
Created January 27, 2016 21:59 — forked from staltz/app.js
Draft of Cycle.js HTTP Driver
const Cycle = require('@cycle/core');
const CycleWeb = require('@cycle/web');
const makeHTTPDriver = require('@cycle/http');
const h = CycleWeb.h;
function main(responses) {
const GITHUB_SEARCH_API = 'https://api.github.com/search/repositories?q=';
// This essentially models when search requests are supposed
// to happen
[{"name":"Israel","dial_code":"+972","code":"IL"},{"name":"Afghanistan","dial_code":"+93","code":"AF"},{"name":"Albania","dial_code":"+355","code":"AL"},{"name":"Algeria","dial_code":"+213","code":"DZ"},{"name":"AmericanSamoa","dial_code":"+1 684","code":"AS"},{"name":"Andorra","dial_code":"+376","code":"AD"},{"name":"Angola","dial_code":"+244","code":"AO"},{"name":"Anguilla","dial_code":"+1 264","code":"AI"},{"name":"Antigua and Barbuda","dial_code":"+1268","code":"AG"},{"name":"Argentina","dial_code":"+54","code":"AR"},{"name":"Armenia","dial_code":"+374","code":"AM"},{"name":"Aruba","dial_code":"+297","code":"AW"},{"name":"Australia","dial_code":"+61","code":"AU"},{"name":"Austria","dial_code":"+43","code":"AT"},{"name":"Azerbaijan","dial_code":"+994","code":"AZ"},{"name":"Bahamas","dial_code":"+1 242","code":"BS"},{"name":"Bahrain","dial_code":"+973","code":"BH"},{"name":"Bangladesh","dial_code":"+880","code":"BD"},{"name":"Barbados","dial_code":"+1 246","code":"BB"},{"name":"Belarus","dial_code":"+375","
@jdgo-mars
jdgo-mars / serverCodes.md
Created March 10, 2017 10:12 — forked from sgnl/serverCodes.md
status codes

1xx: Information

Code Message Description
100 Continue The server has received the request headers, and the client should proceed to send the request body
101 Switching Protocols The requester has asked the server to switch protocols
103 Checkpoint Used in the resumable requests proposal to resume aborted PUT or POST requests

2xx: Successful

Code Message Description
@jdgo-mars
jdgo-mars / Meses e Dias - Array.php
Created March 27, 2017 10:13 — forked from thallisphp/Meses e Dias - Array.php
Array com nomes dos meses e dias da semana em português do Brasil
<?php
$meses = array(
1 => 'Janeiro',
'Fevereiro',
'Março',
'Abril',
'Maio',
'Junho',
'Julho',
	[
		{
			id: 1515665095835,
			slots: [
				{
					id: 1,
					name: 'Thuja occidentalis'
				},
				{
1. What is the difference between the '==' operator and the '===' operator
2. Explain in your own words what is GIT and how it relates to web development?
3. Declare a variable named myFirstVariable and assign it to a string "TheKit Web development Course"
4. Write a function called "add" that takes two arguments and returns their sum
5. Given an array of numbers [1,2,3,4,5,6], generate a new array with only the even numbers [2, 4, 6]
6. What is JSON format? Provide an example
7. Using the Javascript DOM API how would you select an element with an id of "container"?
8. Name 4 mouse events and their purposes.
9. Solve this exercise -> https://codepen.io/jdmartins/pen/EQjOmJ
10. Using the browser console how would you write "banana" without inputting an "N"? Hint: Look into NaN and type coercion.
import { insert } from './insert';
const input = [
{
priority: 20
}
];
test('Should return array with one element when empty', () => {
const result = insert([], { priority: 2 }, 'priority');