Skip to content

Instantly share code, notes, and snippets.

View menushka's full-sized avatar
⏭️
NextJS + TailwindCSS

Menushka Weeratunga menushka

⏭️
NextJS + TailwindCSS
View GitHub Profile
@Mau5Machine
Mau5Machine / docker-compose.yml
Last active December 12, 2023 06:55
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
@SoraAzure
SoraAzure / airdropSorter.scpt
Last active March 12, 2023 12:21 — forked from menushka/airdropSorter.scpt
Avoid overwriting files with the same name in the target folder by appending a number suffix.
property destinationFolder : "Path:to:AirDrop:Folder:in:Alias:format" -- Please change this
property quarantineTypes : { "59" }
on run {input, parameters}
tell application "Finder"
set filesToMove to {}
repeat with iInput from 1 to count input
set filePath to item iInput of input
set shouldProcess to false
if (count quarantineTypes) > 0 then
@glaurent
glaurent / ListCoreAudioDevices.swift
Last active July 11, 2023 07:50 — forked from robotconscience/SelectAudioOutput.mm
List CoreAudio devices in Swift
import Foundation
import CoreAudio
var propertyAddress = AudioObjectPropertyAddress(mSelector: kAudioHardwarePropertyDevices, mScope: kAudioObjectPropertyScopeGlobal, mElement: kAudioObjectPropertyElementMaster)
var propertySize:UInt32 = 0
if AudioObjectGetPropertyDataSize(AudioObjectID(kAudioObjectSystemObject), &propertyAddress, 0, nil, &propertySize) == noErr {
let numDevices = Int(propertySize) / MemoryLayout<AudioDeviceID>.size
@novemberborn
novemberborn / setup.md
Created January 7, 2016 15:05
OS X Redirect ports 80 and 443 to 8080 and 8443 respectively

Changes with .dev domains in mind.

Create /etc/pf.anchors/dev, containing:

rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443

@willthink
willthink / contact.m
Last active March 6, 2023 20:05
Using CNContactStore in Objective C to query contacts info
#import <Contacts/Contacts.h>
@implementation ContactsScan
- (void) contactScan
{
if ([CNContactStore class]) {
//ios9 or later
CNEntityType entityType = CNEntityTypeContacts;
if( [CNContactStore authorizationStatusForEntityType:entityType] == CNAuthorizationStatusNotDetermined)