Skip to content

Instantly share code, notes, and snippets.

View gentlyawesome's full-sized avatar
🏠
Working from home

Arc Angelo Ibalio gentlyawesome

🏠
Working from home
  • Philippines
View GitHub Profile
HIRE Me For Your Project Support :)
Telegram: https://t.me/LinuxGun
#!/bin/bash
# Completely Remove Apache Ubuntu
service apache2 stop
apt purge apache2
apt remove apache2.*
apt autoremove
whereis apache2
#!usr/bin/python
"""
Sample python script to migrate documents from mongodb to apache couchdb database.
This script reads a document from mongodb and writes it to couchdb database.
**Script does not support the use case for 'documents with attachments'
"""
import json
from argparse import ArgumentParser
import requests
@gentlyawesome
gentlyawesome / SanitizeUrl.php
Last active August 29, 2015 11:01 — forked from gabrielef/SanitizeUrl.php
Convert title to seo friendly url
<?php
class SanitizeUrl {
public static function slug($string, $space="-") {
$string = utf8_encode($string);
if (function_exists('iconv')) {
$string = iconv('UTF-8', 'ASCII//TRANSLIT', $string);
}
$string = preg_replace("/[^a-zA-Z0-9 \-]/", "", $string);
@aksakalli
aksakalli / _example_ng-file-upload.md
Last active October 28, 2018 09:51
ng-file-upload example with NodeJS

ng-file-upload example with NodeJS

index.html should be in public folder in the same directory with app.js.

@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active March 24, 2025 20:20
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@gabrielef
gabrielef / SanitizeUrl.php
Last active June 23, 2017 19:48
Convert title to seo friendly url
<?php
class SanitizeUrl {
public static function slug($string, $space="-") {
$string = utf8_encode($string);
if (function_exists('iconv')) {
$string = iconv('UTF-8', 'ASCII//TRANSLIT', $string);
}
$string = preg_replace("/[^a-zA-Z0-9 \-]/", "", $string);
@Voles
Voles / datefilter.js
Created April 25, 2013 12:41
AngularJS daterange filter
RB.filter('daterange', function ()
{
return function(conversations, start_date, end_date)
{
var result = [];
// date filters
var start_date = (start_date && !isNaN(Date.parse(start_date))) ? Date.parse(start_date) : 0;
var end_date = (end_date && !isNaN(Date.parse(end_date))) ? Date.parse(end_date) : new Date().getTime();