Skip to content

Instantly share code, notes, and snippets.

View kalepail's full-sized avatar
🦐
Work, and stuff will happen.

Tyler van der Hoeven kalepail

🦐
Work, and stuff will happen.
View GitHub Profile
@boucher
boucher / gist:1750368
Created February 6, 2012 07:07 — forked from saikat/gist:1084146
Stripe sample checkout form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Sample Form</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<script type="text/javascript">
@cobyism
cobyism / gh-pages-deploy.md
Last active July 18, 2024 05:22
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@aaronthorp
aaronthorp / paths.js
Created March 11, 2014 00:13
Meteor.JS Private and Public Folder Directories. @aaronthorp
// Root of Meteor.js App
meteor_root = Npm.require('fs').realpathSync( process.cwd() + '/../' );
// Private Assets Folder of Meteor.JS App
assets_root = meteor_root + "/server/assets/app/";
@josephdburdick
josephdburdick / gist:49a4bb299a614d8f3f77
Last active August 31, 2017 12:44
Gulpfile - precompress and sprite generation
'use strict';
// generated on 2014-06-24 using generator-gulp-webapp 0.1.0
var src_dir = 'app',
dest_dir = 'dist';
var gulp = require('gulp');
// load plugins
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@Gomah
Gomah / Dockerfile
Last active March 23, 2021 14:33
Nuxt.js Dockerfile :: Now.sh
FROM node:10-alpine
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json /usr/src/app/
COPY yarn.lock /usr/src/app/
RUN yarn install
@itsMattShull
itsMattShull / create-ssl-for-localhost
Created June 26, 2018 03:33
Command to create a key.pem and cert.pem for localhost
openssl req \
-newkey rsa:2048 \
-x509 \
-nodes \
-keyout key.pem \
-new \
-out cert.pem \
-subj /CN=localhost \
-reqexts SAN \
-extensions SAN \
from stellar_sdk import Asset, Network, Address, utils
from stellar_sdk import xdr as stellar_xdr
def get_asset_contract_id(asset: Asset, network_passphrase: str) -> str:
"""Get the contract id of the wrapped token contract."""
network_id_hash = stellar_xdr.Hash(Network(network_passphrase).network_id())
data = stellar_xdr.HashIDPreimage(
stellar_xdr.EnvelopeType.ENVELOPE_TYPE_CONTRACT_ID,
contract_id=stellar_xdr.HashIDPreimageContractID(