This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable, OnDestroy, Optional, SkipSelf } from "@angular/core"; | |
import { Observable, Observer, BehaviorSubject, Subject } from "rxjs"; | |
import { takeUntil, filter } from "rxjs/operators"; | |
import { InjectionToken } from "@angular/core"; | |
@Injectable() | |
export class ContextService implements OnDestroy { | |
constructor(@Optional() @SkipSelf() private _parent?: ContextService) {} | |
private _destroy$ = new Subject<void>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clone the .vmdk image to a .vdi. | |
vboxmanage clonehd "virtualdisk.vmdk" "new-virtualdisk.vdi" --format vdi | |
# Resize the new .vdi image (30720 == 30 GB). | |
vboxmanage modifyhd "new-virtualdisk.vdi" --resize 30720 | |
# Optional; switch back to a .vmdk. | |
VBoxManage clonehd "new-virtualdisk.vdi" "resized-virtualdisk.vmdk" --format vmdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://besmenaas-s.akamaihd.net/live/233720_233721/besmena03s.isml/Manifest?primaryToken=1447620051_9eb02fd5dbf0d0dfdd0d8c8c24550a62 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package commons.web.jsf.validator; | |
import java.util.Date; | |
import java.util.Map; | |
import javax.faces.application.FacesMessage; | |
import javax.faces.component.UIComponent; | |
import javax.faces.context.FacesContext; | |
import javax.faces.validator.FacesValidator; | |
import javax.faces.validator.Validator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package commons.web.primefaces.component.calendar; | |
import commons.web.jsf.validator.CalendarDateRangeValidator; | |
public class Calendar extends org.primefaces.component.calendar.Calendar { | |
public Calendar() { | |
super(); | |
this.addValidator(new CalendarDateRangeValidator()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//---------------------------------------------------// | |
// Change activity since time like Facebook time style | |
//---------------------------------------------------// | |
add_filter('bp_activity_time_since', 'bp_activity_time_since_newformat', 10, 2); | |
function bp_activity_time_since_newformat( $time_since, &$actvitiy ) { | |
$timestamp_now = time(); | |
$timestamp_activity_date_recorded = strtotime( $actvitiy->date_recorded ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//---------------------------------------------------// | |
// Change activity since time to exact data+time | |
//---------------------------------------------------// | |
add_filter('bp_activity_time_since', 'bp_activity_time_since_newformat', 10, 2); | |
function bp_activity_time_since_newformat( $time_since, &$actvitiy ) { | |
// you can change the date format to "Y-m-d H:i:s" | |
$time_since = '<span class="time-since">' . date_i18n("F j, Y", strtotime( $actvitiy->date_recorded ) ) . '</span>'; | |
return $time_since; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'bp_activity_can_favorite', '__return_false' ); | |
add_filter( 'bp_get_total_favorite_count_for_user', '__return_false' ); | |
function bp_admin_bar_render_remove_favorites() { | |
global $wp_admin_bar; | |
$wp_admin_bar->remove_menu('my-account-activity-favorites'); | |
} | |
add_action( 'wp_before_admin_bar_render', 'bp_admin_bar_render_remove_favorites' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add this code to functions.php | |
// then edit groups page from wpadmin pages ( change permalink slug to "your_new_slug_for_groups" ) and save! | |
add_filter('bp_get_groups_root_slug', 'bp_change_groups_root_slug'); | |
function bp_change_groups_root_slug( $group ){ | |
return "your_new_slug_for_groups"; //For example "gatherings" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//add this code to functions.php | |
function bp_remove_allmembers_tab_js_script(){ ?> | |
<script type="text/javascript"> | |
var jq = jQuery; | |
jQuery(document).ready(function (jQuery) { | |
jq('#members-all').removeClass('selected').hide(); | |
jq('#members-personal').find('a').trigger('click'); | |
}); |
NewerOlder