Skip to content

Instantly share code, notes, and snippets.

View onnimonni's full-sized avatar

Onni Hakala onnimonni

View GitHub Profile
@onnimonni
onnimonni / Homebrew error
Created November 28, 2013 11:03
After installing imagemagick and then running $ brew doctor $ brew update I had these errors, hope this helps:
Onni-MacBook-Air:sample_project onnimonni$ brew doctor
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libmacfuse_i32.2.dylib
/usr/local/lib/libmacfuse_i64.2.dylib
/usr/local/lib/libosxfuse_i32.2.dylib
/usr/local/lib/libosxfuse_i64.2.dylib
@onnimonni
onnimonni / screen
Created February 9, 2014 21:01
Wordless Sass not compiling
/************************
WordlessCompileException: [0]: Failed to run the following command: '/Users/onnimonni/.rvm/bin/wordless_compass' 'compile' '--trace' '/Users/onnimonni/Projects/wordpress/wp-content/themes/wordless/tmp' '--config' '/Users/onnimonni/Projects/wordpress/wp-content/themes/wordless/tmp/compass_configgeAWoH'
Generated config:
http_path = "./"
http_images_dir = "../images"
images_dir = "../assets/images"
http_fonts_dir = "../fonts"
fonts_dir = "../assets/fonts"
css_path = "/Users/onnimonni/Projects/wordpress/wp-content/themes/wordless/tmp"
relative_assets = false
@onnimonni
onnimonni / private.xml
Created April 4, 2014 07:22
Koodimonni KeyRemap4MacBook private.xml
<?xml version="1.0"?>
<root>
<item>
<name>Map FN + WASD to arrow keys</name>
<identifier>FN WASD</identifier>
<autogen>__KeyToKey__ KeyCode::A, ModifierFlag::FN, KeyCode::CURSOR_LEFT</autogen>
<autogen>__KeyToKey__ KeyCode::D, ModifierFlag::FN, KeyCode::CURSOR_RIGHT</autogen>
<autogen>__KeyToKey__ KeyCode::W, ModifierFlag::FN, KeyCode::CURSOR_UP</autogen>
<autogen>__KeyToKey__ KeyCode::S, ModifierFlag::FN, KeyCode::CURSOR_DOWN</autogen>
</item>
@onnimonni
onnimonni / Dockerfile
Created May 14, 2014 07:41
Dockerfile for fig
FROM ctlc/buildstep:ubuntu13.10
RUN rm -rf /build/buildpacks/heroku-buildpack-php/
RUN git clone --depth 1 https://github.com/Koodimonni/heroku-buildpack-php.git /build/buildpacks/heroku-buildpack-php
RUN echo https://github.com/Koodimonni/heroku-buildpack-php.git | cat - /build/buildpacks.txt > /tmp/out && mv /tmp/out /build/buildpacks.txt
ADD . /app
ADD ./ssh/ /root/.ssh/
RUN chmod -R 700 /root/.ssh
@onnimonni
onnimonni / composer.json
Last active August 29, 2015 14:04
Example composer.json with koodimonni languages
{
"name": "koodimonni/wordpress",
"type": "project",
"description": "Wordpress with nordic languages. You can update the whole thing using composer. This will always be latest stable version.",
"homepage": "http://languages.koodimonni.fi",
"authors": [
{
"name": "Onni Hakala",
"email": "onni@koodimonni.fi",
"homepage": "https://github.com/onnimonni"
@onnimonni
onnimonni / Installer.php
Last active August 29, 2015 14:04
Install Wordpress languages from languages.koodimonni.fi with this composer script. Place it in scripts/Koodimonni/Installer.php or just copy installLanguages() function to your composer scripts and require it after install/update.
<?php
namespace Koodimonni;
use Composer\Script\Event;
class Installer {
public static function installLanguages(Event $event) {
$io = $event->getIO();
$extra = $event->getComposer()->getPackage()->getExtra();
<link rel="import" href="../../salesforce/s1-elements/scaffold/s1AppScaffold.html">
<link rel="import" href="../../salesforce/s1-elements/scaffold/s1PageContainer.html">
<link rel="import" href="../../salesforce/s1-elements/s1StagedNavigationStageLeft.html">
<link rel="import" href="../../salesforce/s1-elements/s1StagedNavigationNotifications.html">
<link rel="import" href="../../salesforce/s1-elements/s1AnchorLightDefault.html">
<link rel="import" href="../../salesforce/s1-elements/s1ListWithLabels.html">
<link rel="import" href="../../salesforce/s1-elements/s1AnchorDark.html">
<link rel="import" href="../../salesforce/s1-elements/s1IndicatorDotsLightBackground.html">
<link rel="import" href="../../salesforce/s1-elements/s1ButtonGroups.html">
<link rel="import" href="../../salesforce/s1-elements/scaffold/s1DetailView.html">
@onnimonni
onnimonni / update-dns.rb
Last active January 8, 2018 15:31
Digital Ocean dynamic dns DIY. Script which updates your DO domain records when public IP changes. Useful for services running in home office.
#!/usr/bin/env ruby
require 'json'
####MODIFY THESE#####
DOMAIN="example.com"
RECORDNAME="subdomain"
API_KEY="thahh4aevi4poophuM1eish5rashi4xoo9hoo5fish8Pie6jaekoquahy3phagoh" #This is not real api key :P
####MODIFY THESE#####
@onnimonni
onnimonni / .nanorc
Last active August 29, 2015 14:04
Nanorc which has syntax highlight and key bindings for moving in file with ctrl+IJKL
## Use auto-indentation
#set autoindent
# It makes pasting to nano extremely unuseful
## Turn tabstospaces
set tabstospaces
## Constantly display the cursor position in the status bar.
set const

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt