Skip to content

Instantly share code, notes, and snippets.

View bachors's full-sized avatar
🦕

Ican Bachors bachors

🦕
View GitHub Profile
@bachors
bachors / image_upload.html
Last active March 30, 2024 09:52
Convert image to base64, blob or binary with Javascript
<input type="file" id="inputImg" />
<br><br>
Nama file <input type="text" id="nameImg" style="width: 100%"/>
<br><br>
Type file <input type="text" id="typeImg" style="width: 100%"/>
<br><br>
Size file <input type="text" id="sizeImg" style="width: 100%"/>
<br><br>
base64Img: <input type="text" id="base64Url" style="width: 100%"/>
<br>
@bachors
bachors / image_frame.php
Last active November 29, 2016 03:00
Menggabungkan gambar menggunakan php
<?php
// menentukan frame, foto ,padding & file format (jpeg or png)
$frame = 'https://pixabay.com/static/uploads/photo/2016/02/02/01/31/background-1174639_960_720.png';
$foto = 'http://4.bp.blogspot.com/-MnbkNj0P6G4/Viq-PDdxdPI/AAAAAAAAAnw/kpSkfdXs3A0/s1600/yakuza-apocalypse-yayan-ruhian.jpg';
$padding = 150;
$format = 'png';
$frame_info = getImageSize($frame);
$foto_info = getImageSize($foto);
@bachors
bachors / kode_pos.php
Created May 14, 2016 19:17
Membuat API kode POS Indonesia
<?php
/* Just 4 Fun
API kode POS Indonesia
by iBacor.com */
function kode_pos($q){
// array untuk output
$result = array();
@bachors
bachors / visitor_lookup.php
Created December 30, 2015 09:13
Visitor lookup using php
<?php
function user_agent($user_agent) {
$os_platform = "Unknown OS Platform";
$browser = "Unknown Browser";
$os_array = array(
'windows nt 10.0' => 'Windows 10',
@bachors
bachors / mymodal.html
Created January 18, 2015 08:12
Generet & Share Short URL + QR Code with Google API & Bootstrap
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Google Short URL & Google QR Code - iBacor</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css">
@bachors
bachors / Mailbox.php
Last active January 22, 2020 14:51
Reading emails from a IMAP mailbox - PHP example http://ibacor.com/demo/reading-emails-php/
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>IMAP mailbox - iBacor</title>
<!-- Custom style -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css">
<style>
@bachors
bachors / github-repository-search.html
Last active April 23, 2018 09:25
jQuery github repository search. Display all github repository search on your website .. http://ibacor.com/demo/jquery-github-repository-search/
<!DOCTYPE html>
<html>
<head>
<!-- Include jQuery -->
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
<!-- Include Fontawesome (optional) -->
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
@bjoernQ
bjoernQ / AndroidManifest.xml
Created October 14, 2013 13:02
Creating a System Overlay (Always on Top over all Apps) in Android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.mobilej.overlay"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="14" />
<application android:label="SystemOverlay" >
<activity
@nathanpc
nathanpc / phonegap_download_example.html
Created April 22, 2012 13:11
Sample code to download file from internet - Phonegap Wiki
<!DOCTYPE html>
<html>
<head>
<title></title>
<!-- Android
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
<meta charset="utf-8">-->
<!-- iPad/iPhone specific css below, add after your main css >
@chrisjacob
chrisjacob / README.md
Created February 18, 2011 03:44
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result