Skip to content

Instantly share code, notes, and snippets.

View barbareshet's full-sized avatar
🎯
Focusing

ido barnea barbareshet

🎯
Focusing
View GitHub Profile
@marijn
marijn / README.markdown
Last active September 13, 2024 19:00
List of countries in YAML, CSV and TXT format
@fatihacet
fatihacet / get-wp-feeds.js
Created January 15, 2012 01:47
Get WordPress feeds xml by jQuery Ajax request.
$.ajax({
type: 'GET',
dataType: 'xml',
url: '/feed',
success: function(xmlDocument) {
var rss = $(xmlDocument.firstChild);
console.log(rss.find('item'));
}
});
@abuisman
abuisman / typography.sass
Created May 9, 2012 22:15
Mixin for responsive (relative) font-sizes depending on the screen size using media queries.
/*
Mixin for responsive (relative) font-sizes depending on the screen size using media queries.
This is width based, but you can easily adjust it for more complex, or simple, checking.
Set the base as you max size, then I divided everything into tenths of the base.
To use, simply include the mixin, passing it the font-size that you'd want to see at 100%.
This should then scale nicely along in tenths. If you need more detail, just add more elements to the level list.
@derdesign
derdesign / locales.json
Created June 16, 2012 18:54
locales.json
{
"af": "Afrikaans",
"sq": "Albanian",
"am": "Amharic",
"ar_DZ": "Arabic - Algeria",
"ar_BH": "Arabic - Bahrain",
"ar_EG": "Arabic - Egypt",
"ar_IQ": "Arabic - Iraq",
"ar_JO": "Arabic - Jordan",
"ar_KW": "Arabic - Kuwait",
@Integralist
Integralist / 1. Example.scss
Created October 22, 2012 14:10
Sass Mixin for CSS3 Animations
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@opistola
opistola / jquery_no_follow
Created November 30, 2012 12:38
Jquery script to add rel="nofollow" to all likes besides the current domain
$('a').each(function()
{
var reg_exp = new RegExp('/' + window.location.host + '/');
if (!reg_exp.test(this.href))
{
// External Link Found
$(this).attr('rel','nofollow');
}
});
@DavidWells
DavidWells / add-wordpress-settings-page.php
Created January 28, 2013 05:59
WordPress :: Add Settings Page with All Fields
<?php
/*
Plugin Name: Homepage Settings for BigBang
Plugin URI: http://www.inboundnow.com/
Description: Adds additional functionality to the big bang theme.
Author: David Wells
Author URI: http://www.inboundnow.com
*/
// Specify Hooks/Filters
@jareware
jareware / SCSS.md
Last active April 11, 2025 18:25
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@font-face {
font-family: 'STIXGeneral';
src: url('/files/fonts/stixgeneral-webfont.eot');
src: local('STIXGeneral'),local('STIXGeneral-Regular'), url('/files/fonts/stixgeneral-webfont.woff') format('woff'), url('/files/fonts/stixgeneral-webfont.ttf') format('truetype'), url('/files/fonts/stixgeneral-webfont.svg#webfontZXtFAA5Q') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'STIXGeneral';
src: url('/files/fonts/stixgeneralitalic-webfont.eot');
@calebbrewer
calebbrewer / Deploy With Git
Last active October 21, 2023 07:29
Manage and deploy a website with Git. I am using Lunux CentOS for my server.
Video on this Gist: https://www.youtube.com/watch?v=zvpLDuRY4ss&feature=c4-overview&list=UUj8_147vA3FQ1quI_CjciIQ
#Initialize a bare repo on the webserver. This would preferably be outside of your public website dir but if you are on a shared host you may not have that option. I like to make a folder just outside of the live folder called git. So for me it would look like this…
$ cd /var/www
$ mkdir git && cd git
$ git init –-bare
#Now you need to create a post-receive hook that will check out the latest tree from the Git repo you just setup into the /var/www/html folder where you want your website to be. You can make this whatever folder you want your code to end up in.
#This will create a file called post-receive in the hooks dir of the git repo.