Skip to content

Instantly share code, notes, and snippets.

View motoy3d's full-sized avatar

Motoi Kataoka motoy3d

View GitHub Profile
@yuki777
yuki777 / sssh
Last active June 30, 2023 06:00
aws ecs login script version 1
sssh is currently being maintained at pj8/sssh
https://github.com/pj8/sssh
@prog893
prog893 / README.md
Last active November 17, 2024 02:47
CloudFront Signed URL generator in Python

CloudFront Signed URL generator in Python

For signed cookies, refer here

Usage

from cloudfront_signed_url import generate_cloudfront_signed_url

generate_cloudfront_signed_url("https://your-cf-domain.com/path/to/file.txt", 3600)
@tamiroze
tamiroze / sql2sf.py
Last active May 13, 2024 20:06
Converts Oracle, SQL-Server, and other DDL to Snowflake DDL
#!/usr/bin/python
# $Id: $
# Converts Oracle, SQL-Server, and other DDL to Snowflake DDL
def usage():
print """\
# Usage: sql2sf.py input-file [output-file]
"""
@prog893
prog893 / README.md
Last active August 6, 2024 00:45
CloudFront Signed Cookie generator in Python

CloudFront Signed Cookie generator

For signed URLs, refer here

Usage

from cloudfront_signed_url import generate_cloudfront_signed_url

url = "https://your-cf-domain.com/path/to/file.txt"
cookie = generate_cloudfront_signed_cookie(url, 3600)
<?php
/**
* Assumes https://github.com/Spomky-Labs/jose library is installed and autoloading is set up
* Decode and verify token guide: https://github.com/Spomky-Labs/jose/blob/master/doc/operation/Verify.md
*/
use Jose\Factory\JWKFactory;
use Jose\Loader;
// We load the key set from a URL
// JSON Key URL (JKU) - https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/jwks.json.
@lbrenman
lbrenman / index.js
Last active September 3, 2021 22:36
Titanium Local Notifications Example
function doClick(e) {
alert($.label.text);
}
$.index.open();
var alertFields = {
title: 'Notification', //Android Only
body : 'Just another notification',
badge: 1,
package example;
import org.apache.commons.beanutils.expression.DefaultResolver;
public class SafeResolver extends DefaultResolver {
@Override
public String next(String expression) {
String property = super.next(expression);
if ("class".equalsIgnoreCase(property)) {
@kawasima
kawasima / SafeResolver.java
Last active October 3, 2020 02:40
Struts1 S2-020対応
/**
* A Resolver that doesn't call getClass().
*
* @author kawasima
*/
public class SafeResolver extends DefaultResolver {
private static final char NESTED = '.';
private static final char MAPPED_START = '(';
private static final char MAPPED_END = ')';
private static final char INDEXED_START = '[';
@MotiurRahman
MotiurRahman / app.js
Last active August 6, 2017 12:37
How to delete cache file in webView
/*When we load any website site in webView it generate some cache file also in the app cacheDirectory we
can delete this easily, here is the sample code*/
var win = Ti.UI.createWindow({
layout : 'vertical',
exitOnClose : true
});
var delBtn = Ti.UI.createButton({
top : 10,
package com.yokogoshi.line_intent_test;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;