Skip to content

Instantly share code, notes, and snippets.

Avatar

Zoltán Adamek scorchio

View GitHub Profile
@scorchio
scorchio / # python - 2020-01-07_15-15-32.txt
Created Jan 21, 2020
python on macOS 10.14.5 - Homebrew build logs
View # python - 2020-01-07_15-15-32.txt
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 Aug 31, 2017 — forked from wh1tney/deploy-static-site-heroku.md
How to deploy a static website to Heroku
View deploy-static-site-heroku.md

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 Apr 23, 2017
"Looping over" values in Excel VBA with Find()/FindNext()
View excel_fast_find.vb
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 Jul 22, 2016
IEFixerFilter: workaround to get Waffle + Spring Security working in Internet Explorer
View IEFixerFilter.java
// 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 Jan 7, 2016
Unnecessary HTML which breaks output
View unnecessary.htm
<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 Dec 19, 2013
VBA example code for clearing a worksheet
View worksheet_clear.vb
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
View NinePatchBitmapFactory.java
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 Jan 17, 2012
Sample for overriding CKeditor settings when used with the WYSIWYG modul in Drupal
View sample-wysiwyg-ckeditor-config-override.php
<?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 Jan 5, 2012
Reveal conflicts with Foundation navigation bar - modal does not launch from navigation bar with data-reveal-id
View reveal_foundation_navigation.html
<!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" />