Skip to content

Instantly share code, notes, and snippets.

View promatik's full-sized avatar
🌊

António Almeida promatik

🌊
View GitHub Profile
@SamSaffron
SamSaffron / gist:101357
Created April 24, 2009 21:51
Control Vlc
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using Microsoft.Win32;
using System.Runtime.InteropServices;
using System.Management;
using System.Net.Sockets;
using System.IO;
@anjackson
anjackson / SwingFXWebView.java
Created January 19, 2012 15:41
Embedding a JavaFX WebView in a Swing panel.
import com.sun.javafx.application.PlatformImpl;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javafx.application.Platform;
import javafx.collections.ObservableList;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Group;
import javafx.scene.Node;
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@caprica
caprica / SwtBrowserCanvas.java
Created October 8, 2013 19:57
Embed an SWT Webkit Browser component inside a Swing JPanel, with non-crashing clean-up.
/*
* This class is made available under the Apache License, Version 2.0.
*
* See http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Author: Mark Lee
*
* (C)2013 Caprica Software (http://www.capricasoftware.co.uk)
*/
@adrexia
adrexia / styles.less
Last active December 14, 2016 15:45
Atom - hide file icons and replace arrows
.tree-view {
.icon:before{
display:none;
}
&.list-tree.has-collapsable-children .list-nested-item {
> .list-item:before{
content: "\f05b";
}
&.collapsed > .list-item:before{
content: "\f05a";
@pgmccann
pgmccann / styles.less
Created April 17, 2014 08:59
Condensed tree view for http://atom.io. Modify stylesheet using Atom > Open Your Stylesheet.
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@hans2103
hans2103 / .htaccess-mod_headers
Created April 13, 2015 08:33
.htaccess rules to set cache control.
<IfModule mod_headers.c>
Header set Connection keep-alive
# Cache-control headers
# 2 HOURS
#<filesMatch "*">
Header set Cache-Control "max-age=7200, must-revalidate"
#</filesMatch>
# 480 weeks - 290304000
@jatubio
jatubio / web.config
Created April 29, 2015 03:49
IIS web.config file for Laravel 5
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!-- Quitar los slash '/' del final de la ruta -->
<rule name="RewriteRequestsToPublic">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
</conditions>
@vluzrmos
vluzrmos / paginate.php
Created July 20, 2016 14:31
Laravel Paginate Collection or Array
<?php
/**
* Gera a paginação dos itens de um array ou collection.
*
* @param array|Collection $items
* @param int $perPage
* @param int $page
* @param array $options
*
* @return LengthAwarePaginator