Skip to content

Instantly share code, notes, and snippets.

@tarunmahe
tarunmahe / namada_rpc.md
Created February 14, 2024 11:24
Namada shielded rpc

Public rpc endpoints as a service. 194.233.65.95:26657

export VAL_ADDRESS=tnam1qxkapjmrhxta0w75majjawv0ulc8g4trtqdt0tnc
export WALLET=kryptogem
export MEMO=tpknam1qzr84ydtsd2zg28k62qwds37x446pjy3zcsmwy5rcfdhejuwdezm72gaccy    
namadac bond --source $WALLET --validator $VAL_ADDRESS --amount 10  --memo $MEMO --node 194.233.65.95:26657
Enter your decryption password:
@tarunmahe
tarunmahe / Git push deployment in 7 easy steps.md
Created April 20, 2018 18:08 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@tarunmahe
tarunmahe / Contact.java
Created August 31, 2017 14:44 — forked from bugraoral/Contact.java
Loading contacts with thumbnail images faster. Normally, with any loader fetching 500 contacts with images can take up to 3 seconds. With this task you can load them in ~500ms.
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.IntDef;
import android.text.TextUtils;
import java.io.Serializable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
public class Contact {
@tarunmahe
tarunmahe / file0.swift
Created May 9, 2017 10:15 — forked from 1amageek/file0.swift
Firebase Cloud Functionsを使ってFacebook AccountKitをFirebase Authと連携する ref: http://qiita.com/1amageek/items/c7adbd9f2bbf3a57d352
// AccoutKitの初期化
let accountKit: AKFAccountKit = AKFAccountKit(responseType: .authorizationCode)
// AccountKitを起動して電話番号認証を行う
func login() {
let inputStatus: String = UUID().uuidString
let viewController: AKFViewController = self.accountKit.viewControllerForPhoneLogin(with: nil, state: inputStatus) as! AKFViewController
prepareLoginViewController(viewController: viewController)
self.present(viewController as! UIViewController, animated: true, completion: nil)
@tarunmahe
tarunmahe / wordpress-firebase.php
Created April 29, 2017 09:53 — forked from derekconjar/wordpress-firebase.php
An example of using Firebase and WordPress together. The idea is to use WP's custom post types and metaboxes to make content management easy, and sync with Firebase so that your websites have access to a real-time JSON feed of your custom data.
<?php
/**
* All custom functions should be defined in this class
* and tied to WP hooks/filters w/in the constructor method
*/
class Custom_Functions {
// Custom metaboxes and fields configuration
@tarunmahe
tarunmahe / fix-wordpress-permissions.sh
Created February 28, 2017 11:52 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
<html>
<body>
<h2>Privacy Policy</h2>
<p>PiApps built the Love Calculator app as a freemium | ad-supported | commercial app. This SERVICE is provided by PiApps at no cost and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding our policies with the collection, use, and
disclosure of Personal Information if anyone decided to use our Service.</p>
<p>If you choose to use our Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that We collect are used for providing and
improving the Service. We will not use or share your information with anyone except as described
@tarunmahe
tarunmahe / DeviceUID.m
Created August 13, 2016 19:17 — forked from miguelcma/DeviceUID.m
iOS Unique Device ID that persists between app reinstalls
/* DeviceUID.h
#import <Foundation/Foundation.h>
@interface DeviceUID : NSObject
+ (NSString *)uid;
@end
*/
// Device.m
@tarunmahe
tarunmahe / apitest.php
Created July 24, 2016 12:10 — forked from karlkranich/apitest.php
Updated PHP code to use the Google Sheets API. See usage instructions at http://karl.kranich.org/2015/04/16/google-sheets-api-php/ More examples at https://gist.github.com/karlkranich/afa39e3d778455b38c38
<?php
// apitest.php
// by Karl Kranich - karl.kranich.org
// version 3.1 - edited query section
require_once realpath(dirname(__FILE__) . '/vendor/autoload.php');
include_once "google-api-php-client/examples/templates/base.php";
$client = new Google_Client();
@tarunmahe
tarunmahe / main.js
Last active August 29, 2015 14:27 — forked from gfosco/main.js
// The before save handler will pass information to the after save handler to disable the
// after save handler from creating a loop.
// It also prevents client side code from triggering the silent change, by using a different flag
// that the client should never see.
// It should only be visible in the data browser, won't be sent to a client in an undefined state.
Parse.Cloud.beforeSave('TestObject', function(request, response) {
handleComingFromTask(request.object);
response.success();
});