Skip to content

Instantly share code, notes, and snippets.

View abr4xas's full-sized avatar
🐧
Focusing

ángel abr4xas

🐧
Focusing
View GitHub Profile
{
"directory": "components"
}
@cobyism
cobyism / gh-pages-deploy.md
Last active April 12, 2025 09:10
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@conspirator
conspirator / git-chipper
Created November 28, 2012 04:20
A quick shell script to delete local git branches en masse.
#!/bin/bash
# ## git-chipper
#
# Author: Christopher Webb <[email protected]>
# Website: http://conspirator.co
# License: http://www.opensource.org/licenses/MIT
#
# Move to master branch. Delete all other local branches.
#
@MrDys
MrDys / gist:3512455
Created August 29, 2012 13:26
Link directly to an open modal window in Bootstrap
/* If you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it:
Make sure your modal has an id:
<div class="modal" id="myModal" ... >
Then stick this bit of Javascript at at the end of your document:
*/
$(document).ready(function() {
@yesidays
yesidays / test.py
Created May 3, 2012 05:28
Primeros pasos Python
print "Hola Mundo"
#Numeros hexadecimales anteponiendo 0x
hexa = 0xA
print hexa
#Numeros octales anteponiendo un 0
octal = 010
print octal
@ToddG
ToddG / sample-atom-1.0-feed.xml
Created March 4, 2012 20:26
sample-atom-1.0-feed
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<subtitle>Insert witty or insightful remark here</subtitle>
<link href="http://example.org/"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
<email>[email protected]</email>
@liliumbs
liliumbs / sform.js
Created February 3, 2012 08:02
Google Like Search Form - JavaScript
$(document).ready(function() {
// if text input field value is not empty show the "X" button
$("#field").keyup(function() {
$("#x").fadeIn();
if ($.trim($("#field").val()) == "") {
$("#x").fadeOut();
}
});
// on click of "X", delete input field value and hide "X"
$("#x").click(function() {
@xtian
xtian / html5boilerplate.jade
Last active December 23, 2023 15:05
HTML5 Boilerplate in jade
!!! 5
html(class='no-js')
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge')
title
meta(name='description', content='')
meta(name='viewport', content='width=device-width, initial-scale=1')