Skip to content

Instantly share code, notes, and snippets.

View DaAwesomeP's full-sized avatar

Perry Naseck DaAwesomeP

View GitHub Profile
/******************************************************************************
Compass.ino
For the project here: http://www.instructables.com/id/DIY-Digital-Compass-for-your-car
Originally Created: August 10, 2015
Written by Perry Naseck (https://perrynaseck.com/)
Dependencies:
- Cardinal (in Library Manager and at https://github.com/DaAwesomeP/arduino-cardinal )
- Sparkfun Micro OLED Breakout (in Library Manager and at https://github.com/sparkfun/SparkFun_Micro_OLED_Arduino_Library )
- Wire (included with IDE)
@szwacz
szwacz / nw-external-links.html
Last active December 22, 2015 02:29
node-webkit: General solution for opening links in system default browser. Useful if you have a lot of links to deal with.
@guifromrio
guifromrio / compress-pdf-with-gs.md
Created August 30, 2013 14:39
Compress PDF files with ghostscript

This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.

ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Other options for PDFSETTINGS:

  • /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
  • /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
  • /printer selects output similar to the Acrobat Distiller "Print Optimized" setting.
  • /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting.
@rriemann
rriemann / INSTALL.md
Last active December 10, 2017 17:12
Howto install Gitlab on top of opensuse 12.3 32bit

Please read everything before starting!

Install OS

  • Download OpenSUSE 12.3 32bit, Network edition http://download.opensuse.org/distribution/12.3/iso/openSUSE-12.3-NET-i586.iso
  • I chose 32bit, because Ruby Binary Extensions might have problems with lib64 path structure. We workaround this bug.
  • I chose networkinstall, because we need only very few packages and don't need to download everything. only 200MB are downloaded during install
  • the image can easily copied to a usb pen drive using the gui tool "imagewriter" (executed as root)
  • Partition: There are 2 big hard drives. I created on both of them first a primary pratition of 1GB of type LINUX-RAID
@ck-on
ck-on / ocp.php
Last active March 25, 2024 09:30
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
@jcasimir
jcasimir / sessions_and_conversations.markdown
Created September 11, 2011 23:07
Sessions and Conversations in Rails 3

Sessions and Conversations

HTTP is a stateless protocol. Sessions allow us to chain multiple requests together into a conversation between client and server.

Sessions should be an option of last resort. If there's no where else that the data can possibly go to achieve the desired functionality, only then should it be stored in the session. Sessions can be vulnerable to security threats from third parties, malicious users, and can cause scaling problems.

That doesn't mean we can't use sessions, but we should only use them where necessary.

Adding, Accessing, and Removing Data