Skip to content

Instantly share code, notes, and snippets.

View kampfq's full-sized avatar

Ben kampfq

View GitHub Profile
@athanasius-kircher
athanasius-kircher / add-apache-vhost
Last active September 7, 2017 09:18
Shell script to add a vhost entry to your apache pointing to current folder, for quick local development setup. Some basic things have to be setuped, as local main domain, with a local certificate. Bases on a brewer apache installation.
#!/bin/bash
#Config this according to your needs, all variables are currently mandatory
#-------------------------------------------------------------------------------
#Your local main dev domain
MAIN_DOMAIN_NAME=".ls-boellmann.local"
#Path to cert apache uses
CERT_PATH="/usr/local/etc/apache2/2.4/crt/boellmann_dev_local.crt"
#Path to key apache uses
KEY_PATH="/usr/local/etc/apache2/2.4/crt/Julius_dev_local_neu.pem"
@oleq
oleq / _README.md
Last active July 1, 2024 21:37
A2DP audio streaming using Raspberry PI (Raspbian Jessie)

What is this all about?

This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.

   Audio source (i.e. smartphone) 
                |
                v
 (((  Wireless Bluetooth Channel  )))
 |
@RameshRM
RameshRM / BackgroundFetch.swift
Last active March 8, 2022 14:36
Swift Background Fetch
Step 1: Enable capabilities "background fetch"
Step2 : Setup AppDelegate.swift
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let settings = UIUserNotificationSettings(forTypes: UIUserNotificationType.Alert, categories: nil)
UIApplication.sharedApplication().registerUserNotificationSettings(settings)
UIApplication.sharedApplication().setMinimumBackgroundFetchInterval(UIApplicationBackgroundFetchIntervalMinimum)
return true;
@raelgc
raelgc / Email Server (Linux, Unix, Mac).md
Last active July 2, 2024 08:43
Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

1 - Point localhost.com to your machine

Most of programs will not accept an email using just @localhost as domain. So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:

127.0.0.1 localhost.com

2 - Install Postfix

@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@gertig
gertig / Mac style drop shadow.css
Created August 23, 2012 20:38
Mac style drop shadow
box-shadow:inset 0 1px 0 rgba(255,255,255,.6), 0 22px 70px 4px rgba(0,0,0,0.56), 0 0 0 1px rgba(0, 0, 0, 0.3);
@Ocramius
Ocramius / User.php
Last active February 16, 2024 14:57
Doctrine 2 ManyToMany - the correct way
<?php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity()
* @ORM\Table(name="user")
*/
class User
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 2, 2024 13:33
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname