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 | |
$a = preg_replace("/[\/=+]/", "", base64_encode(openssl_random_pseudo_bytes(7))); | |
$b = uniqid($a); | |
echo $b; |
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 | |
$handle = fopen ("php://stdin","r"); | |
echo "\nAplikasi sederhana menghitung jarak antara titik A dan B pada bidang Euclid dimensi n menggunakan koordinat Cartisean\n"; | |
echo "\nMasukkan dimensi: "; | |
$dimensi = fgets($handle); | |
echo "\nMasukkan koordinat titik A\n"; |
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
netstat -anlp | grep -w LISTEN |
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
https://stackoverflow.com/questions/16956810/finding-all-files-containing-a-text-string-on-linux# | |
Do the following: | |
grep -rnw '/path/to/somewhere/' -e "pattern" | |
-r or -R is recursive, -n is line number and -w stands match the whole word. -l (letter L) can be added to have just the file name. | |
Along with these, --exclude or --include parameter could be used for efficient searching. Something like below: |
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/sh | |
# Put this file in ~/.kde4/Autostart | |
export SSH_ASKPASS=/usr/lib/ssh/ksshaskpass | |
/usr/bin/ssh-add </dev/null |
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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="font"> | |
<edit mode="assign" name="rgba"> | |
<const>rgb</const> | |
</edit> | |
</match> | |
<match target="font"> | |
<edit mode="assign" name="hinting"> |
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
# Apache .htaccess | |
# Thanks to Eric Duran http://ericduran.io/2013/05/31/angular-html5Mode-with-yeoman/ | |
# angularjs pushstate (history) support: | |
# See http://www.josscrowcroft.com/2012/code/htaccess-for-html5-history-pushstate-url-routing/ | |
<ifModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d |
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
<html> | |
<head> | |
<script src="http://connect.facebook.net/en_US/all.js" type="text/javascript"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> | |
<script src="strophe-102.js" type="text/javascript"></script> | |
<script src="facebook.js" type="text/javascript"></script> | |
<script> | |
var BOSH_SERVICE = 'http://island.csie.org:8273/xmpp-httpbind' | |
var connection = null; |