Skip to content

Instantly share code, notes, and snippets.

View CristinaSolana's full-sized avatar
💭
Making things.

Cristina Solana CristinaSolana

💭
Making things.
View GitHub Profile
@nrollr
nrollr / ApacheHTTPSConfig.md
Last active March 11, 2024 13:32
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

@berzniz
berzniz / jshipster_and_and.js
Last active May 22, 2022 23:15
Some small javascript hacks for hipsters
// Boring
if (isThisAwesome) {
alert('yes'); // it's not
}
// Awesome
isThisAwesome && alert('yes');
// Also cool for guarding your code
var aCoolFunction = undefined;
@jorgepinon
jorgepinon / alert.js
Last active December 15, 2015 12:38
A tiny jquery plugin that adds a close link to an alert div
(function($){
$.fn.extend({
//pass the options variable to the function
alert: function(options) {
//Set the default values
var defaults = {
pull: 'right',
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
if environment == :production
on_stylesheet_saved do |file|
# pretty logging output when making a gzipp'ed file
gz_file = Pathname.new("#{file}.gz").relative_path_from(Pathname.new(project_path))
Compass::Logger.new.record(:create, gz_file)
# This generates a file of the same name but ending in .gz
`gzip -f #{file}`
end
end
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@wesbos
wesbos / gist:1739883
Created February 4, 2012 20:21
PhantomJS Media Query Screenshot
var page = new WebPage(),
address, output, size;
address = "http://www.wesbos.com/";
width = 1024; height = 600;
output = "./screenshots/screenshot-"+width+"X"+height+".png";
page.viewportSize = { width: width, height: height };
if (phantom.args.length === 3 && phantom.args[1].substr(-4) === ".pdf") {
@nathansmith
nathansmith / html_reset.css
Created January 28, 2010 00:02
Reset for HTML4 / HTML5
/* `XHTML, HTML4, HTML5 Reset
----------------------------------------------------------------------------------------------------*/
a,
abbr,
acronym,
address,
applet,
article,
aside,