Forward GnuPG agent from macOS to Linux
Run gpg once as your to create the directory structure
gpg --list-keys
import { LiquidityPoolKeysV4, MARKET_STATE_LAYOUT_V3, Market, TOKEN_PROGRAM_ID } from "@raydium-io/raydium-sdk"; | |
import { Connection, Logs, ParsedInnerInstruction, ParsedInstruction, ParsedTransactionWithMeta, PartiallyDecodedInstruction, PublicKey } from "@solana/web3.js"; | |
const RPC_ENDPOINT = 'https://api.mainnet-beta.solana.com'; | |
const RAYDIUM_POOL_V4_PROGRAM_ID = '675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8'; | |
const SERUM_OPENBOOK_PROGRAM_ID = 'srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX'; | |
const SOL_MINT = 'So11111111111111111111111111111111111111112'; | |
const SOL_DECIMALS = 9; | |
const connection = new Connection(RPC_ENDPOINT); |
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.10; | |
import {ERC20, SafeTransferLib} from "solmate/utils/SafeTransferLib.sol"; | |
import {DSTestPlus} from "solmate/test/utils/DSTestPlus.sol"; | |
struct Packet { | |
uint16 srcChainId; | |
uint16 dstChainId; |
{ | |
"presets": ["env", "react"], | |
"plugins": [ | |
"transform-class-properties", | |
"transform-object-rest-spread", | |
"react-hot-loader/babel" | |
] | |
} |
#!/usr/bin/env bash | |
# https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" | |
sudo apt-get update | |
sudo apt-get install docker-ce | |
# https://docs.docker.com/compose/install/ |
<?php | |
add_action('admin_init', function () { | |
// Redirect any user trying to access comments page | |
global $pagenow; | |
if ($pagenow === 'edit-comments.php') { | |
wp_redirect(admin_url()); | |
exit; | |
} |
Meteor is great at sharing code between different builds for different platforms. You can use the same source for your browser builds, server builds, your builds for iOS, Android, ... But how to organize your project to be able to orchestrate your builds for different apps and services from the same source? This post elaborates on the reasons why you need these different builds and how you could accomplish this with Meteor easily.
Say you have an app with completely different end user experiences depending on their role. It is common practice to have the user logged in, check her authorization (role) and then setup different routes or load different templates to serve that type of user’s needs. While doing so, all types of users load the same build and the app decides what portions of the build to use and what not to use.
/** | |
* This is a project designed to get around sites using Cloudflare's "I'm under attack" mode. | |
* Using the PhantomJS headless browser, it queries a site given to it as the second parameter, | |
* waits six seconds and returns the cookies required to continue using this site. With this, | |
* it is possible to automate scrapers or spiders that would otherwise be thwarted by Cloudflare's | |
* anti-bot protection. | |
* | |
* To run this: phantomjs cloudflare-challenge.js http://www.example.org/ | |
* | |
* Copyright © 2015 by Alex Wilson <[email protected]> |
/** | |
List of radio buttons. Unlike checklist, value is stored internally as | |
scalar variable instead of array. Extends Checklist to reuse some code. | |
@class radiolist | |
@extends checklist | |
@final | |
@example | |
<a href="#" id="options" data-type="radiolist" data-pk="1" data-url="/post" data-title="Select options"></a> | |
<script> |
<?php | |
/** | |
* WooCommerce: Hide 'Coupon form' on checkout page if a coupon was already applied in the cart | |
* Add to theme functions.php file or Code Snippets plugin | |
*/ | |
add_filter( 'woocommerce_coupons_enabled', 'woocommerce_coupons_enabled_checkout' ); | |
function woocommerce_coupons_enabled_checkout( $coupons_enabled ) { |