Skip to content

Instantly share code, notes, and snippets.

@diriver63
diriver63 / pyodbc-unixODBC-lambda-layer
Last active April 28, 2024 19:35
pyodbc and unixODBC for MSSQL as a lambda layer
# use https://github.com/lambci/docker-lambda to simulate a lambda environment
docker run -it --rm --entrypoint bash -e ODBCINI=/opt/odbc.ini -e ODBCSYSINI=/opt/ lambci/lambda:build-python3.7
# download and install unixODBC
# http://www.unixodbc.org/download.html
curl ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.7.tar.gz -O
tar xzvf unixODBC-2.3.7.tar.gz
cd unixODBC-2.3.7
./configure --sysconfdir=/opt --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --prefix=/opt
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active May 2, 2024 03:18
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@gjedeer
gjedeer / boto_sns.py
Created June 24, 2015 22:01
How to send a push notification directly to device using Python, Boto and SNS
import boto
import boto.exception
import boto.sns
import pprint
import re
def send_push(device_id, body):
region = [r for r in boto.sns.regions() if r.name==u'eu-west-1'][0]
sns = boto.sns.SNSConnection(
@rodw
rodw / backup-github.sh
Last active March 30, 2024 15:04
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
#-------------------------------------------------------------------------------
# NOTES:
#-------------------------------------------------------------------------------
# * Under the heading "CONFIG" below you'll find a number of configuration
# parameters that must be personalized for your GitHub account and org.
# Replace the `<CHANGE-ME>` strings with the value described in the comments
# (or overwrite those values at run-time by providing environment variables).
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@cbguder
cbguder / verifyReceipt.py
Created September 23, 2010 21:42
Verify in-app purchase receipts
#!/usr/bin/env python
import sys
import json
import base64
import urllib2
liveURL = 'https://buy.itunes.apple.com/verifyReceipt'
sandboxURL = 'https://sandbox.itunes.apple.com/verifyReceipt'
@zoul
zoul / Sound.h
Created October 9, 2009 08:09
Simple wrapper around Audio Services
/*
- Trivial wrapper around system sound as provided by Audio Services.
- Don’t forget to link against the Audio Toolbox framework.
- Assumes ARC support.
*/
@interface Sound : NSObject
// Path is relative to the resources dir.
- (id) initWithPath: (NSString*) path;