Skip to content

Instantly share code, notes, and snippets.

View astronaughts's full-sized avatar
💡
Working from home

Masahiro Ueno astronaughts

💡
Working from home
  • Chatwork
  • Osaka, Japan
View GitHub Profile
@arikfr
arikfr / refresh.py
Last active May 3, 2024 10:33
Redash Refresh API usage example with parameters Raw
import os
import requests
import time
from pprint import pprint
def poll_job(s, redash_url, job):
# TODO: add timeout
while job['status'] not in (3,4):
response = s.get('{}/api/jobs/{}'.format(redash_url, job['id']))
@0xjac
0xjac / private_fork.md
Last active July 24, 2024 23:13
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@hassy
hassy / parse_aws.md
Last active January 17, 2024 04:11
Deploying Parse Server on AWS (WIP)

Deploying Parse Server on AWS

Note: this is a work-in-progress and will be updated with more information over the next few days.

Intro

This guide will walk you through deploying your own instance of the open-source Parse Server. This would be a good starting point for testing your existing application to see if the functionality provided by the server is enough for your application, and to potentially plan your migration off the Parse Platform.

This guide will walk you through using Elastic Beanstalk (EB), which is an AWS service similar to Heroku. Why use EB rather than Heroku? Elastic Beanstalk does not lock you into Heroku-specific ways of doing things, is likely cheaper to run your backend on than Heroku, and it integrates with other services that AWS offer (and they offer almost everything one needs to run an application these days).

@manigandham
manigandham / rich-text-html-editors.md
Last active July 23, 2024 12:07
Rich text / HTML editors and frameworks

Strictly Frameworks

Abstracted Editors

These use separate document structures instead of HTML, some are more modular libraries than full editors

#!/bin/bash
# Invoke this script with a relative '.app' path, for example:
# codesign-electron.sh "darwin-x64/Electron.app"
# 1. Run the following command to get a list of identities:
# security find-identity
# 2. Now set the value of the identity variable below to the identity you want to use:
identity="Developer ID Application: ... (...)"
package net.yanzm.profileapplication;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
@twada
twada / gulpfile.js
Last active January 31, 2016 10:50
espower-coffee を使ってコード生成を経ずに (gulp-espower を使わずに) CoffeeScript + power-assert を使うデモ (npm test でも gulp test でも動きます)
var gulp = require('gulp');
var mocha = require('gulp-mocha');
gulp.task('test', function () {
require('espower-coffee/guess');
return gulp
.src('test/**/*.coffee')
.pipe(mocha());
});
@polidog
polidog / gorilla3.py
Last active October 26, 2015 09:52
うっかりAmazon 3SにNFD(utf-8-mac)なファイル名をアップロードしたときに修正する方法
# coding: utf-8
import re
import unicodedata
from sh import aws
BUCKET = "aws-bucket-name" # 対象のs3 bucket名
s3 = aws.bake("s3")
def _s3rename(path, name, rename):
@agemooij
agemooij / NormalizeSupport.scala
Last active September 22, 2022 11:02
Scala text normalization
package rfs.rebb
package common
/**
* Performs standard Java/unicode normalization on the trimmed and lowercased form
* of the input String and then adds a few extra tricks for dealing with special
* characters.
*
* JVM/Unicode normalization references (warning: learning curve black hole, beware!):
*
@gakuzzzz
gakuzzzz / 1_.md
Last active August 2, 2023 01:59
Scala の省略ルール早覚え

Scala の省略ルール早覚え

このルールさえ押さえておけば、読んでいるコードが省略記法を使っていてもほぼ読めるようになります。

メソッド定義

def concatAsString(a: Int, b: Int): String = {
  val a_ = a.toString();
  val b_ = b.toString();