Skip to content

Instantly share code, notes, and snippets.

@0xohzsh
0xohzsh / .zshrc
Created July 21, 2024 12:35
Zinit Setp
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Fix Locale
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
# History
@0xohzsh
0xohzsh / 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:
@0xohzsh
0xohzsh / 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
@0xohzsh
0xohzsh / 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 {
@0xohzsh
0xohzsh / 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)
@0xohzsh
0xohzsh / 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
@0xohzsh
0xohzsh / 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
@0xohzsh
0xohzsh / 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
@0xohzsh
0xohzsh / 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();