Skip to content

Instantly share code, notes, and snippets.

View marcus-at-localhost's full-sized avatar
💭

Marcus marcus-at-localhost

💭
View GitHub Profile
@marcus-at-localhost
marcus-at-localhost / zurb-ink-650.css
Last active August 29, 2015 14:27 — forked from rx/zurb-ink-650.css
Zurb Ink converted to 650px wide.
/**********************************************
* Ink v1.0.5 - Copyright 2013 ZURB Inc *
**********************************************/
/* Client-specific Styles & Reset */
#outlook a {
padding: 0;
}
@marcus-at-localhost
marcus-at-localhost / A-button.jade
Last active August 29, 2015 14:27
Jade/HTML Beispiel
table.button
tr
td(mc:edit="btn_call_to_action2")
a(href='#') Call To Action Button 2
@marcus-at-localhost
marcus-at-localhost / 1. Directory Structure.txt
Last active August 29, 2015 14:27
Jade Zurb Mailchimp Messup
.
| gruntfile.js
| package.json
|
+---dist
| | email-template-inline.html (inlined styles)
| | email-template.html (normal html)
| |
| +---css
| | mailchimp.css (just a copy)
@marcus-at-localhost
marcus-at-localhost / a_info.md
Last active August 29, 2015 14:27
Experimental Standalone OpenSSL text file de/encrypter for Sublime-Text-Crypto Package

OpenSSL text file de/encrypter

This is an alternative way to decrypt text files that got encrypted by the Sublime Text Crypto Package. Just in case, Sublime Text is not available.

Setup

  1. Download OpenSSL Windows Binaries here or here
  2. Extract to a folder openssl
  3. Place the file crypt.bat one level up
@marcus-at-localhost
marcus-at-localhost / ssh.md
Last active September 3, 2015 16:15
SSH in Windows
  1. puttygen.exe erzeugt privaten und öffentlichen Key.
  2. Speichere privaten Key mit Passwort als *.ppk
  3. Exportiere privaten Key als Open SSH Datei, um von Git & Co verwendet werden zu können.
  4. Lade die *.ppk Datei in pageant.exe dem Auth Agenten/Schlüsselmanager (Muss bei jedem Systemneustart erneut gemacht werden)
  5. Der öffentliche Schlüssel ssh-rsa AAAA...base64== rsa-key-20150903 wird auf dem Server in die Datei /.ssh/authorized_keys kopiert (musste vom Provider hinzugefügt werden)
  6. Test mit putty.exe ob man sich ohne Passwort per ssh einloggen kann.
  7. Kopiere die den privaten Key (openssh Datei) in das Verzeichnis C:\Users\xo\.ssh\ und nenne die Datei id_rsa -> Info
  8. Setze die Umgebungsvariablen GIT_SSH=E:\xampp\Putty\plink.exe und PATH=E:\xampp\Putty\ Info
  9. Starte Console2 oder CMD und verbinde dich mit dem Server ssh [email protected] -p 22
    Es wird nach dem Passwort der *.ppk
git diff --name-status SHA1 SHA2
@marcus-at-localhost
marcus-at-localhost / relabsolut.php
Last active May 21, 2020 14:28
[Relative to absolute links with regex and DOMDocument] #domdocument #regex
<?php
function regexToAbs($text, $base)
{
if (empty($base))
return $text;
// base url needs trailing /
if (substr($base, -1, 1) != "/")
$base .= "/";
@marcus-at-localhost
marcus-at-localhost / dhl_remote_area.txt
Last active November 1, 2017 15:27
[DHL Remote Area] Officially, DHL provides a huge pdf and a crappy interface to query Remote Areas (http://raslist.dhl.com/jsp/first.jsp) - how is an online shop supposed to calculate shipping costs for remote areas without a public API or dataset?This data comes from DHL, but I had to tweak the zip codes for GB, because it's not possible to que…
Land;Postleitzahl von;Postleitzahl bis;Zone;Remote Area Typ
AD;AIXIRIVALL;AIXIRIVALL;3;G
AD;AIXOVALL;AIXOVALL;3;G
AD;ALDOSA;ALDOSA;3;G
AD;ANDORRA;ANDORRA;3;G
AD;ANDORRA LA;ANDORRA LA;3;G
AD;ANSALONGA;ANSALONGA;3;G
AD;ANYOS;ANYOS;3;G
AD;ARANS;ARANS;3;G
AD;ARINSAL;ARINSAL;3;G
@marcus-at-localhost
marcus-at-localhost / open-on-localhost.bat
Last active October 12, 2015 11:55
Put this into windows `shell:sendto` and you can open a file in your local webroot (in my case `E:\WEB`) with starting php's build in webserver first at http://localhost:8000/ and then view the file. I use this to quickly open a project specific [mdwiki](http://dynalon.github.io/mdwiki/#!index.md).
@echo off
set input=%1
Echo.Input was - %input%
set converted=%input:E:\WEB\=http://localhost:8000/%
set converted=%converted:\=/%
echo.Converted to - %converted%
start php -S localhost:8000 -t "E:\WEB\"
@marcus-at-localhost
marcus-at-localhost / gist:762f30849a579c4ae74b
Created January 21, 2016 22:47 — forked from betweenbrain/gist:2284129
Git command to export only changed files between two commits
git archive --output=file.zip HEAD $(git diff --name-only SHA1 SHA2)