Skip to content

Instantly share code, notes, and snippets.

View hkkcngz's full-sized avatar
💭
never git up

Hakkı Cengiz hkkcngz

💭
never git up
View GitHub Profile
<?php
function phone_format( $phone )
{
$retVal = $phone;
//telefon ile ilgili islemler
if (0 === strlen($retVal)) {//telefon numarasi yoksa hic ugrasma
return $retVal;
}
@Binary-Finery
Binary-Finery / MainActivity.java
Created July 15, 2017 13:32
Popup menu example without inflating XML. Menu items are added dynamically
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.widget.PopupMenu;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
@Override
@bhnascar
bhnascar / ReadingPractice.java
Created March 12, 2017 22:02
Code reading practice
import java.util.*;
class ReadingPractice
{
/* What is the return value of |mystery("hi")|?
*
* (A) hi
* (B) hi5
* (C) hi55
* (D) mn
.radial-progress {
$circle-size: 120px;
$circle-background: #d6dadc;
$circle-color: #97a71d;
$inset-size: 90px;
$inset-color: #fbfbfb;
$transition-length: 1s;
$shadow: 6px 6px 10px rgba(0,0,0,0.2);
$percentage-color: #97a71d;
$percentage-font-size: 22px;
@champsupertramp
champsupertramp / Ultimate Member - Add menu items in Profile Settings menu
Last active April 26, 2020 17:29
Ultimate Member - Add menu items in Profile Settings menu
<?php
add_filter("um_profile_edit_menu_items","um_custom_profile_edit_menu_items",10,2);
function um_custom_profile_edit_menu_items( $items, $profile_id ){
$items[ ] = array(
"my_custom_menu_item" => '<a href="http://example.com/" class="real_url">'.__('My Custom Menu Item','ultimatemember').'</a>',
);
return $items;
@JustMaier
JustMaier / README.md
Created August 3, 2016 01:25
Select box CSS Reset

Safari has some annoying default styling for select boxes. This will reset it to a respectable default.

Note: This was created with Bootstrap in mind, but it can easily be modified to work with anything you like

@pmaingi
pmaingi / Sublime Text 3 Build 3103 License Key - CRACK
Created May 19, 2016 11:19
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@champsupertramp
champsupertramp / Ultimate Member Notification extension - Add a custom notification
Last active January 26, 2021 02:44
Ultimate Member Notification extension - Add a custom notification
<?php
/**
* Ultimate Member Notification extension - Add a custom notification
*/
if( class_exists("UM_Notifications_API") ){
global $um_notifications;
$um_notifications->api->store_notification( $author, 'my_custom_notification_type', $vars );
add_filter("um_notifications_core_log_types","custom_um_notifications_core_log_types",10,1);
function um_notifications_core_log_types( $array ){
@ultimatemember
ultimatemember / gist:f7eab149cb33df735b08
Last active May 30, 2024 18:03
Extend Ultimate Member Account page with custom tabs/content
/* add new tab called "mytab" */
add_filter('um_account_page_default_tabs_hook', 'my_custom_tab_in_um', 100 );
function my_custom_tab_in_um( $tabs ) {
$tabs[800]['mytab']['icon'] = 'um-faicon-pencil';
$tabs[800]['mytab']['title'] = 'My Custom Tab';
$tabs[800]['mytab']['custom'] = true;
return $tabs;
}
@inetbiz
inetbiz / wordpress-category-collectionpage-schema.html
Created August 21, 2014 18:06
WordPress Category Description in Schema.org Colletion Page markup
<div itemscope itemtype="http://schema.org/CollectionPage">
<meta itemprop="sameAs" content="https://en.wikipedia.org/wiki/Social_media" />
<a itemprop="url" href="https://www.example.org/category/social-media/"><img src="/wp-content/uploads/xxxx/xxxx/xxxxxx.png" width="95" height="100" itemprop="logo" alt="Social Media Iconic Representation" align="left"></a>
<div itemprop="name"><strong>Open Source Hardware</strong></div>
<div itemprop="description">Whatever description you are going to use that is contextual to both your sameAs content and the category loop</div>
</div>