Skip to content

Instantly share code, notes, and snippets.

@zenideas
zenideas / existing code to git repo
Created October 1, 2012 09:52
Adding existing source to remote git repo
If you've got local source code you want to add to a new remote new git repository without 'cloning' the remote first, do the following (I often do this - you create your remote empty repository in bitbucket/github, then push up your source)
1. Create the remote repository, and get the URL such as git://github.com/youruser/somename.git
2. If your local GIT repo is already set up, skips steps 2 and 3
3. Locally, at the root directory of your source, git init
4. Locally, add and commit what you want in your initial repo (for everything,
git add .
<div class="tour" data-daily-price="357">
<h2>Paris, France Tour</h2>
<p>$<span id="total">0</span> for <span id="nights-count">2</span> Nights</p>
<p>
<label for="nights">Number of Nights</label>
</p>
<p>
<input id="nights" value="7" type="number">
</p>
</div>
@zenideas
zenideas / gist:5656664
Last active December 17, 2015 18:58
http://try.jquery.com/levels/4/challenges/19 When this link is clicked, show the photos for the clicked tour by traversing to it using closest and find then sliding it down by using slideToggle.
<div id="all-tours" class="links">
<h1>Guided Tours</h1>
<ul>
<li class="tour usa" data-discount="199">
<h2>New York, New York</h2>
<span class="details">$1,899 for 7 nights</span>
<button class="book">Book Now</button>
<a href="#" class="see-photos">See Photos</a>
<ul class="photos">
<li>
<?php
function woocommerce_product_custom_fields()
{
global $woocommerce, $post;
echo '<div class="product_custom_field">';
woocommerce_wp_text_input(
array(
'id' => '_custom_product_title',
'placeholder' => __('Arabic Product Title'),
'label' => __('Arabic Product Title', 'woocommerce'),
@zenideas
zenideas / bn_en_numerals.js
Last active March 24, 2023 17:37
I am assuming that you have some text or numbers where you want to replace Bengali numerals ০১২৩৪৫৬৭৮৯ to 0-9. Put that text or number in cell J15 and try this formula in cell K15.
/* Original vba script was from https://support.google.com/docs/thread/65089055/sheets-bengali-number?hl=en I just reversed for the reversed result.*/
=arrayformula(
concatenate(
iferror(
vlookup(
mid(J15, row(J$1:J), 1),
{
mid("০১২৩৪৫৬৭৮৯", row(J$1:J), 1),
mid("0123456789", row(J$1:J), 1)
},
/* Converted from Microsoft's shown example of number to currency words with aid of ChatGPT3 */
function CurrencyToBangla(MyNumber) {
var Temp;
var Taka = '';
var Poisha = '';
var DecimalPlace, Count;
var Place = ['', '',' হাজার ', ' লাখ ', ' কোটি ', 'শত ', ' হাজার ', ' লাখ ', ' কোটি '];
MyNumber = String(MyNumber).trim();
DecimalPlace = MyNumber.indexOf('.');
if (DecimalPlace > 0) {
@zenideas
zenideas / Infobox_person.htm
Last active August 17, 2023 16:57
বাংলা উইকিপিডিয়ার ‌‌‌তথ্যছক_ব্যক্তি এর জন্য
== TemplateData ==
{{TemplateData header}}
<div style="width:auto; overflow:scroll">
<templatedata>
{
"description": "ব্যক্তির সম্পর্কে তথ্যছক",
"format": "{{_\n| __________________ = _\n}}\n",
"params": {
"honorific_prefix": {
"description": "সম্মানসূচক প্রথমাংশ(সমূহ), ব্যক্তির নামের উপরে দেখাবে",
== টেমপ্লেটডাটা ==
{{TemplateData header}}
<templatedata>
{
"params": {
"name": {
"required": true,
"label": "হাসপাতালের নাম",
"type": "wiki-page-name",
"aliases": [
==টেমপ্লেটডাটা==
{{Collapse top|title=[[Wikipedia:TemplateData|TemplateData]] for this template used by [[mw:Extension:TemplateWizard|TemplateWizard]], [[Wikipedia:VisualEditor|VisualEditor]] and other tools}}
{{TemplateData header|noheader=1}}
<templatedata>
{
"description": "পদস্থ কর্মকর্তার জন্য তথ্যছক",
"format": "{{_\n| ___________________ = _\n}}\n",
"params": {
"name": {
"label": "নাম",
{{collapse top|[[Wikipedia:TemplateData|TemplateData]] documentation used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools}}
{{TemplateData header|noheader=1}}
<templatedata>
{
"description": "ক্রিকেটারদের জন্য তথ্যছক। পরামিতির তালিকা ভীতিজনক; তাদের সব পূরণ করার প্রয়োজন নেই।",
"params": {
"name": {
"label": "নাম",
"description": "খেলোয়াড়ের ব্যবহৃত ‘ক্রিকেট’ নাম (যেমন সাকিব আল হাসান, এবি ডিভিলিয়ার্স)",
"type": "string",