Skip to content

Instantly share code, notes, and snippets.

View octavian-nita's full-sized avatar

Octavian Nita octavian-nita

View GitHub Profile
@tdominey
tdominey / gist:5218319
Created March 22, 2013 01:40
Semi-transparent album hovers in Regale
a.album-hover:hover span.overlay {
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=80)";
filter: alpha(opacity=80);
opacity: 0.8;
}
@laurendavissmith
laurendavissmith / album.lens
Created March 28, 2013 14:16
clicking images inside albums to launch lightbox for the Boulevard theme
<koken:if false="pjax">
<koken:include file="inc/head.html" />
</koken:not>
<koken:load infinite="true">
<koken:head>
<meta property="og:site_name" content="{{ site.title }}" />
<meta property="og:title" content="{{ album.title strip_html="true" }}" />
<meta property="og:description" content="{{ album.summary strip_html="true" }}" />
@mlaccetti
mlaccetti / SpringWebConfiguration.java
Created August 13, 2013 14:40
Getting swagger to run using SpringMVC and 100% annotations.
import java.io.File;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.core.io.ClassPathResource;
@gitaarik
gitaarik / git_submodules.md
Last active July 8, 2024 16:25
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active June 4, 2024 04:16
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@staltz
staltz / introrx.md
Last active July 8, 2024 15:46
The introduction to Reactive Programming you've been missing
@dotcomputercraft
dotcomputercraft / gist:b7283bd52f4b5389e748
Last active June 29, 2024 18:52
How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
the best way (I've found) to completely uninstall node + npm is to do the following:
go to /usr/local/lib and delete any node and node_modules
go to /usr/local/include and delete any node and node_modules directory
if you installed with brew install node, then run brew uninstall node in your terminal
check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
go to /usr/local/bin and delete any node executable
You may need to do the additional instructions as well:
sudo rm /usr/local/bin/npm
@lukas-h
lukas-h / license-badges.md
Last active July 4, 2024 06:01
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

Quick Tips for Fast Code on the JVM

I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.

This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea