Skip to content

Instantly share code, notes, and snippets.

View ShahriarKh's full-sized avatar

Shahriar ShahriarKh

View GitHub Profile
@subfuzion
subfuzion / curl.md
Last active June 11, 2024 00:17
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@DracoBlue
DracoBlue / _respond-to.scss
Last active December 20, 2021 14:12
respond-to with multiple breakpoints and nice way to define them (in scss)
@mixin respond-to($medias...) {
$breakpoints-length: length($respond-to-breakpoints);
@each $media in $medias {
$had-a-hit: false;
@for $i from 1 through $breakpoints-length {
$breakpoint: nth($respond-to-breakpoints, $i);
@if $media == nth($breakpoint, 1) {
$definition: nth($breakpoint, 2);
@armno
armno / .htaccess
Created February 15, 2013 09:35
Allowing Access-Control-Allow-Origin to multiple domains for Ajax requests
# source: http://www.lowest-common-denominator.com/2010/01/http_access_control_to_multipl.php
# - replace `domain1.com` and `domain2.com`
# - add more domains by separating each domain with a pipe `|`
# - escape dot `.` with a backslash
<IfModule mod_headers.c>
SetEnvIf Origin "^http(s)?://(.+\.)?(domain1\.com|domain2\.com)$" origin_is=$0
Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is
</IfModule>
@whitingx
whitingx / meta-tags.md
Created October 5, 2012 16:41 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@rondevera
rondevera / css-to-select-range-of-children.html
Last active February 8, 2023 11:29
CSS selector for a range of children
<!DOCTYPE html>
<html>
<head>
<style>
/* How to select a range of children
* (Here, 3rd-7th children, inclusive):
*/
ul li:nth-child(n+3):nth-child(-n+7) {
outline: 1px solid #0f0;
}