Skip to content

Instantly share code, notes, and snippets.

View starise's full-sized avatar
Damn fine coffee

Andrea Brandi starise

Damn fine coffee
View GitHub Profile
@agnoster
agnoster / README.md
Last active July 13, 2024 19:26
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@thefuxia
thefuxia / plugin-class-demo.php
Last active April 11, 2024 13:50
Plugin Class Demo
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: Plugin Class Demo
* Description: How I am using the base class in plugins.
* Plugin URI:
* Version: 2012.09.29
* Author: Fuxia Scholz
* License: GPL
* Text Domain: plugin_unique_name
* Domain Path: /languages
@developdaly
developdaly / media_shortcode.php
Last active March 16, 2016 21:45
This shortcode will reference a media item, configurable via attributes. Using a shortcode is more flexible and won't require database search/replace when migrating domains. Core would benefit from utilizing this system rather than inserting absolute paths to media URLs. A shortcode would keep media references relative to the site's domain.
<?php
/*
* Plugin Name: Media Shortcode
* Author: developdaly
* Version: 1.0
* Description: This shortcode will reference a media item, configurable via attributes. Using a shortcode is more flexible and won't require database search/replace when migrating domains.
*
* ex. [media id="97"] = <img src="http://example.com/97-300x150.jpg" class="thumbnail">
*
*/
@CastenettoA
CastenettoA / gist:5787297
Last active April 28, 2017 07:58 — forked from liamcurry/gist:2597326
Muoversi da jQuery a Javascript non è difficile, anzi, può essere divertente e sicuramente stimolante. Impara la vera potenza di Javascript seguendo questo breve tutorial. Senza jQuery, Javascript, risulterà molto più performante, veloce e se vuoi flessibile...

Muoversi da jQuery a javascript

Usare Javascript invece che jQuery nei tuoi progetti può essere una mossa molto intelligente, non solo imparerai più a fondo le dinamiche del linguaggio e diventarai naturalmente più esperto, ma incrementerai notevolmente le performance del tuo sito.

Se lavori in grossi progetti e applicazioni che richiedono tante linee di codice lavorare in puro Javascript è un po frustrante, in questo caso un mix di JQuery e Javascript è necessario.

  1. [Eventi] (#eventi)
  2. [Selettori] (#selettori)
  3. [Modifica Attributi] (#modifica)
@gregrickaby
gregrickaby / html5-schema.org-markup.html
Last active August 2, 2022 00:05
Proper SCHEMA.ORG markup
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noodp, noydir" />
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
<link rel="canonical" href="http://mysite.com/" />
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" />
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active July 11, 2024 10:06
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
@Xeroday
Xeroday / Twitch.py
Created September 6, 2013 18:41
A script to fake views on Twitch.tv, http://www.ericzhang.me/faking-views-on-twitch-tv/
import requests
import subprocess
import json
import sys
import threading
import time
from Queue import Queue
numberOfViewers = int(sys.argv[1])
builderThreads = int(sys.argv[2])
@konklone
konklone / ssl.rules
Last active May 19, 2024 18:02
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
# Custom tasks
require 'capistrano/composer'
require 'capistrano/npm'
@mixin arrow_helper($arrowSize, $arrowColor, $margin, $side, $align) {
@if $side == "top" {
border-bottom-color: $arrowColor;
top: -2 * $arrowSize;
}
@if $side == "bottom" {
border-top-color: $arrowColor;
bottom: -2 * $arrowSize;
}
@if $side == "left" {