Skip to content

Instantly share code, notes, and snippets.

View scorchio's full-sized avatar

Zoltán Adamek scorchio

View GitHub Profile
@scorchio
scorchio / # python - 2020-01-07_15-15-32.txt
Created January 21, 2020 09:50
python on macOS 10.14.5 - Homebrew build logs
Homebrew build logs for python on macOS 10.14.5
Build date: 2020-01-07 15:15:32
@scorchio
scorchio / deploy-static-site-heroku.md
Last active August 31, 2017 09:44 — forked from wh1tney/deploy-static-site-heroku.md
How to deploy a static website to Heroku

Gist

This is a quick tutorial explaining how to get a static website hosted on Heroku.

Why do this?

Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This tutorial will teach you how.

Basic Assumptions

@scorchio
scorchio / excel_fast_find.vb
Created April 23, 2017 21:44
"Looping over" values in Excel VBA with Find()/FindNext()
Dim matchRange As Range, firstMatchRange As Range
Set matchRange = ws.columns(COLUMN_TO_SEARCH_IN).Find( _
What:=VALUE_TO_SEARCH_BY, LookIn:=xlValues, LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchByte:=False)
' Don't forget that the match will be the cell only, you will need
' to get the entire row from that for usual processing.
' Check if there's a match at all
If Not matchRange Is Nothing Then
' Memorize first match to be able to recognize whether we've got
@scorchio
scorchio / IEFixerFilter.java
Last active July 22, 2016 11:24
IEFixerFilter: workaround to get Waffle + Spring Security working in Internet Explorer
// package
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.GenericFilterBean;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
@scorchio
scorchio / unnecessary.htm
Created January 7, 2016 20:31
Unnecessary HTML which breaks output
<div class="page" title="Page 14">
<div class="section">
<div class="layoutArea">
<div class="column">
<div class="page" title="Page 15">
<div class="section">
<div class="layoutArea">
<div class="column">
<div class="page" title="Page 16">
<div class="section">
@scorchio
scorchio / worksheet_clear.vb
Created December 19, 2013 11:12
VBA example code for clearing a worksheet
Sub ClearSheet()
Dim sheetToClear As Worksheet
Set sheetToClear = ActiveSheet ' Replace this with the sheet reference
' Delete something specific...
' sheetToClear.Cells.ClearFormats
' sheetToClear.Cells.ClearContents
' sheetToClear.Cells.ClearHyperlinks
' ...or every kind of data in the cells
sheetToClear.Cells.Clear
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.NinePatch;
import android.graphics.Rect;
import android.graphics.drawable.NinePatchDrawable;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
/**
@scorchio
scorchio / sample-wysiwyg-ckeditor-config-override.php
Created January 17, 2012 22:27
Sample for overriding CKeditor settings when used with the WYSIWYG modul in Drupal
<?php
function scor_ckeditor_config_wysiwyg_editor_settings_alter(&$settings, $context) {
if ($context['profile']->editor == 'ckeditor') {
$settings['toolbar'] = array(
array(
'PasteText', 'PasteFromWord', 'RemoveFormat', '-',
'Link', 'Unlink', 'Anchor', '-',
'Image', 'Flash', 'CreateDiv', 'break', '-',
'Source', 'Maximize'),
@scorchio
scorchio / reveal_foundation_navigation.html
Created January 5, 2012 10:47
Reveal conflicts with Foundation navigation bar - modal does not launch from navigation bar with data-reveal-id
<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8" />