Skip to content

Instantly share code, notes, and snippets.

@kmpm
kmpm / adding-pixel-to-raspbian-lite.md
Last active March 23, 2024 19:31
Adding PIXEL to Raspbian Lite

Adding PIXEL/GUI to Raspbian Lite

These 'notes' were primarily intended for my own consumption but since there have been surprisingly many comments to it over the years I wanted to do some updates and clarifications. Thanks for all comments.

These instructions will require you to have connection to internet from your pi, WiFi, Ethernet or by some other means like a 3G USB dongle or something.

Preparations

@leonardofed
leonardofed / README.md
Last active May 3, 2024 01:24
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@yan-foto
yan-foto / OpenWRT | OpenVPN | PIA - README.md
Last active January 5, 2020 22:25
OpenWRT configurations to run OpenVPN client | Private Internet Access - https://www.privateinternetaccess.com

This gist contains all the OpenWRT configuraion files needed to connect to Private Internet Access (PIA) VPN servers. The following files are included:

  • network: contains configuration to add a virtual network device (i.e. tun1366) and custom DNS servers
  • openvpn: OpenVPN configuration file to connect to PIA VPN servers
  • firewall: firewall configuration which passes all traffic through VPN and rejects any request when OpenVPN is down

NOTE: there are a number of other files required to be available under /etc/openvpn for this approach to work:

  • pia.auth: VPN credentials in two lines, first the username and the second the password
@colinvh
colinvh / aws.md
Last active April 23, 2024 09:15
AWS Region Names

Alternative naming schemes for AWS regions

Purpose

The intent is to define terse, standards-supported names for AWS regions.

Schemes

@jokeyrhyme
jokeyrhyme / Dockerfile
Last active August 29, 2015 14:03
Docker and Vagrant
FROM ubuntu:14.04
MAINTAINER Ron Waldon <jokeyrhyme@gmail.com>
RUN apt-get -y update
RUN apt-get -y install build-essential ruby2.0 ruby2.0-dev libxml2-dev libxslt-dev
WORKDIR /usr/bin
RUN ln -sf ruby2.0 ruby
@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing
@subudeepak
subudeepak / ClickSimulation.md
Last active August 29, 2015 14:02
The functionality exists but only native implementation seem to be able to use it

The button click in JavaScript

I have always wondered why the button click could be simulated using the document.element.click() event. I mean if only we could ensure that any click event that originates must be a click event because of user interaction, it would make life just a step better right ! So many form submits under malicious circumstances could be avoided. [For the technically informed: Of course there are workarounds that need other mechanisms in place]. A sample code of how this can be done is here

So this week I was working on the HTML5's full screen API. I am not a major audio/visual person so I have not had the pleasure of exploring this API before. I was planning on hosting a presentation online. Like many of us I chose to use JS to write this 'modern' presentation. In my computer, I generally use the presentation mode of chromium thereby making it a good solution without the need to use the terrible api of HTML5. It is not terrible because of the spec

@kmpm
kmpm / helper_apt.sh
Last active August 29, 2015 13:56
vagrant-ubuntu-precise
#!/bin/bash
echo '.. checking apt cache'
timestamp_file="$(mktemp)"
touch -d "$(date -R -d '1 day ago')" $timestamp_file
file=/var/lib/apt/periodic/update-success-stamp
if [ $file -ot $timestamp_file ]; then
echo '.. old apt cache'
apt-get update
apt-get upgrade -y
@negamorgan
negamorgan / basic-reddit-posts.rb
Last active August 29, 2015 13:56
Create array of reddit front page posts; no type data included
require 'json'
require 'rest-client'
r = JSON.parse(RestClient.get('http://reddit.com/.json'))
p = r["data"]["children"]
posts_array = p.collect { |post| post["data"] }
# posts_array is an array of post hashes
# you can iterate over posts_array or do posts_array[0]["url"]

Inheritance in AngularJS.

angular.module('animal', [])
    .factory('Animal',function(){
        return function(vocalization){
            return {
                vocalization:vocalization,
                vocalize : function () {
                    console.log('vocalize: ' + this.vocalization);

}