Skip to content

Instantly share code, notes, and snippets.

@hanuor
hanuor / send sms for free.md
Created April 6, 2024 12:47
Send SMS to any mobile number in the world for free

I came across an awesome API on RapidApi that allowed me to send SMS to any mobile number for free.

The name of the api is WhatSMS [https://rapidapi.com/shanjohridev/api/whatsms/]

If you are looking for something similar and want to integrate SMS into your or your client's application, then follow the steps below:

Here are the steps

@hanuor
hanuor / test.py
Created December 22, 2022 08:45 — forked from pawiromitchel/test.py
MT5 | Place a trade programmatically with python
import requests as req
import json
import time
import MetaTrader5 as mt5
order = json.loads('{ "status": "NEW", "type": "BUY", "ticker": "EURUSD", "take_profit": "1.0820987897891143", "stop_loss": "1.0819768153163283" }')
# display data on the MetaTrader 5 package
print("MetaTrader5 package author: ", mt5.__author__)
print("MetaTrader5 package version: ", mt5.__version__)
<a href=”#add_to_cart” class=”btnmain”>Add to Cart </a>
CSS
.btnmain {display:inline-block;color:#fff;background:#222;padding:10px 20px;}
@hanuor
hanuor / landing.html
Created November 28, 2019 05:55
Landing page
<?php
global $CI; ?>
<!DOCTYPE html>
<html>
<?php $CI->load->view('common/header', array()); ?>
<link rel="stylesheet" type="text/css" href="<?= base_url('assets/css/footer.css') ?>">
<link rel="stylesheet" href="<?= base_url('/assets/css/large.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= base_url('assets/css/global.css') ?>">
<body>`
<!-- Google Tag Manager (noscript) -->
{
"Version": "2008-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::sample-bucket/profile_images*"
{
"Version": "2008-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::sample-bucket/profile_images*"
@hanuor
hanuor / SampleFile.java
Last active June 9, 2019 12:11
Medium article
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent intent) {
if (resultCode == AutocompleteActivity.RESULT_OK) {
Place place = Autocomplete.getPlaceFromIntent(intent);
// place.getName();
// place.getAddress();
} else if (resultCode == AutocompleteActivity.RESULT_ERROR) {
Status status = Autocomplete.getStatusFromIntent(intent);
} else if (resultCode == AutocompleteActivity.RESULT_CANCELED) {
// The user canceled the operation.
@hanuor
hanuor / PlacesFieldSelector.java
Created February 6, 2019 06:22
Medium article Google places SDK
public class PlacesFieldSelector {
private final List<PlaceField> placeFields;
public PlacesFieldSelector() {
this(Arrays.asList(Place.Field.values()));
}
public PlacesFieldSelector(List<Place.Field> validFields) {
placeFields = new ArrayList<>();
@hanuor
hanuor / Pz.txt
Last active July 6, 2018 08:09
Puzzly about app
Version 0.1.1. Guess my name? P.
@hanuor
hanuor / min_edit_dist.java
Created May 27, 2018 16:57
Minimum Edit Distance
/**
* Date 07/07/2014
* @author Tushar Roy
*
* Given two strings how many minimum edits(update, delete or add) is needed to convert one string to another
*
* Time complexity is O(m*n)
* Space complexity is O(m*n)
*