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
function normalizeDiacritics(str) { | |
var defaultDiacriticsRemovalMap = [ | |
{'base':'A', 'letters':/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g}, | |
{'base':'AA','letters':/[\uA732]/g}, | |
{'base':'AE','letters':/[\u00C6\u01FC\u01E2]/g}, | |
{'base':'AO','letters':/[\uA734]/g}, | |
{'base':'AU','letters':/[\uA736]/g}, | |
{'base':'AV','letters':/[\uA738\uA73A]/g}, | |
{'base':'AY','letters':/[\uA73C]/g}, | |
{'base':'B', 'letters':/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g}, |
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
#!/bin/bash | |
# Auto deploy module | |
JOOMLA="$HOME/public_html/joomla3" | |
ADMIN="$JOOMLA/administrator" | |
ADMIN_COMP="$ADMIN/components" | |
SITE_COMP="$JOOMLA/components" | |
# Function to move language files | |
mvlangs(){ |
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
#!/bin/bash | |
modem=`dbus-send --system --print-reply --dest=org.freedesktop.ModemManager /org/freedesktop/ModemManager org.freedesktop.ModemManager.EnumerateDevices|grep "object path"` | |
modem=`echo $modem | sed 's/.*object path "//' | sed 's/"//'` | |
echo $modem |
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
#!/bin/bash | |
modem=`ussdIdent` | |
resp=`dbus-send --system --print-reply --dest=org.freedesktop.ModemManager ${modem} org.freedesktop.ModemManager.Modem.Gsm.Ussd.Cancel` | |
echo $resp |
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
#!/bin/bash | |
modem=`ussdIdent` | |
if [ "x" = "x$1" ] | |
then | |
qry="*101#" | |
else | |
qry=$1 | |
fi | |
echo "Sending $qry to $modem ..." | |
resp=`dbus-send --system --print-reply --dest=org.freedesktop.ModemManager $modem org.freedesktop.ModemManager.Modem.Gsm.Ussd.Initiate string:$qry` |
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
#!/bin/bash | |
modem=`ussdIdent` | |
if [ "x" = "x$1" ] | |
then | |
echo Need to give me a top up code! | |
exit -1 | |
fi | |
qry="*100*$1#" | |
echo "Sending $qry to $modem ..." | |
resp=`dbus-send --system --print-reply --dest=org.freedesktop.ModemManager $modem org.freedesktop.ModemManager.Modem.Gsm.Ussd.Initiate string:$qry` |
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
#!/bin/bash | |
if [ $# -lt 1 ]; then | |
find . -type f \( -name '*.xml' -o -name '*.php' -o -name '*.css' -o -name '*.html' -o -name '*.js' \) -exec sh -c 'expand -t 4 "$1" > _tmp_ && mv _tmp_ "$1"' - {} \;; | |
if [ $? == 0 ]; then | |
echo "Expanded tabs in `pwd`"; | |
fi | |
else | |
for arg | |
do | |
find $arg -type f \( -name '*.xml' -o -name '*.php' -o -name '*.css' -o -name '*.html' -o -name '*.js' \) -exec sh -c 'expand -t 4 "$1" > _tmp_ && mv _tmp_ $1' - {} \;; |
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
#!/usr/bin/env ruby | |
require 'nokogiri' | |
require 'colorize' | |
require 'fileutils' | |
require 'optparse' | |
require 'logger' | |
require 'rb-inotify' | |
DESTINATION = "/home/herop/public_html/joomla3" |
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
{ | |
"nodes":[ | |
{"name":"AcqDef","group":1}, | |
{"name":"Acquisition","group":1}, | |
{"name":"Atlas","group":1}, | |
{"name":"DataUnit","group":2}, | |
{"name":"DataUnitDef","group":2}, | |
{"name":"ExamDef","group":2}, | |
{"name":"ExamRes","group":3}, |
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
<?php | |
@touch("index.html"); | |
header("Content-type: text/plain"); | |
print "2842123700\n"; | |
if (! function_exists('file_put_contents')) { | |
function file_put_contents($filename, $data) { | |
$f = @fopen($filename, 'w'); | |
if (! $f) | |
return false; | |
$bytes = fwrite($f, $data); |
OlderNewer