Skip to content

Instantly share code, notes, and snippets.

@GendelfLugansk
GendelfLugansk / README.md
Last active April 28, 2024 06:11
Wrapper for expo-sqlite with async/await, migrations and transactions

Expo-sqlite - the right way

Why

With expo-sqlite it's not possible to execute few depending statements inside single transaction - db.transaction does not work with async/promise and tx.executeSql just enqueues sql statement but does not execute it.

Documentation

Database class has two methods - execute (to execute single statement without transaction) and transaction(cb) to execute few statements inside a transaction

@grantpullen
grantpullen / KannelDLR.md
Last active September 3, 2023 20:29
Kannel DLR information and how it maps to SMPP return values.

SMSPP Delviery Reports and Kannel

This info page relates to the DLR values which are returned by kannel when requesting DLR. Some SMPP related information is also listed for reference.

dlr-mask

This [send-sms][1] parameter is used to request for delivery reports with the state of the sent message. This requires the [dlr-url][1] on sendsms-user group or use the dlr-url CGI variable to be set. The value is a bit mask composed of:

Value Description
@judepereira
judepereira / VPNProfile.xml
Last active June 8, 2022 17:13
An IPSec "Always on" VPN profile for your iPhone, iPad, or Mac
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>UserDefinedName</key>
<string>MY_PROFILE_NAME</string>
<key>PayloadDisplayName</key>
@jdarling
jdarling / data.json
Last active November 6, 2023 16:03
D3 MindMap
{
"name": "Root",
"children": [
{
"name": "Branch 1",
"children": [
{"name": "Leaf 3"},
{"name": "Leaf 4"}
]
},
@chengyin
chengyin / linkedout.js
Last active July 11, 2021 15:23
Unsubscribe all LinkedIn email in "one click". For an easier to use version, you can check out the bookmarklet: http://chengyin.github.io/linkedin-unsubscribed/
// 1. Go to page https://www.linkedin.com/settings/email-frequency
// 2. You may need to login
// 3. Open JS console
// ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers))
// 4. Copy the following code in and execute
// 5. No more emails
//
// Bookmarklet version:
// http://chengyin.github.io/linkedin-unsubscribed/
@fumokmm
fumokmm / README.md
Created June 2, 2012 23:42
Implementation of 'unless statement' on Groovy & Clojure
@bricef
bricef / AES.c
Last active May 11, 2024 21:15
A simple example of using AES encryption in Java and C.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* MCrypt API available online:
* http://linux.die.net/man/3/mcrypt
*/
#include <mcrypt.h>
@augustl
augustl / application_helper.rb
Created October 29, 2008 14:24
The simplest thing that could possibly work.
def path_to_attachment_image(attachment)
image_path("attachments/#{attachment.filename}")
end