Skip to content

Instantly share code, notes, and snippets.

@zdienos
zdienos / clone.bash
Created August 26, 2018 11:00 — forked from milanboers/clone.bash
Clone all repositories of a Github user
curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone
@zdienos
zdienos / AND_OR_NOT
Created September 1, 2018 10:38 — forked from oliverdoetsch/AND_OR_NOT
Blogger: Globally conditional data tags for all page types
#AND
<b:if cond='data:blog.pageType == "index"'>
<b:if cond='data:blog.searchQuery'>
<!--search_page AND index_page-->
</b:if>
</b:if>
#OR
@zdienos
zdienos / resizeImage.js
Created September 3, 2018 11:57 — forked from oliverdoetsch/resizeImage.js
automatically resize blogger images to fit full blog post area
<script language='javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' type='text/javascript'/>
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function() {
$.fn.resizeImage = function() {
$('.post-body').table_to_div();
var postWidth = $('.post-body').width();
var sAttribut = /\/s\B\d{2,4}/;
$('.post-body').find('img').each(function(n, image){
@zdienos
zdienos / Google Blogger Social Meta Tags.html
Created September 3, 2018 16:47 — forked from milanaryal/Google Blogger Social Meta Tags.html
Google Blogger/BlogSpot Social Meta Tags for Facebook, Twitter, Google+, Pinterest [v1.0]
<!-- add the following code in the head tag -->
<head prefix='og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#'>
<!-- Share Image -->
<link href='YOUR_LOGO_IMAGE' rel='image_src'/>
<!-- Open Graph Meta Tags -->
<b:if cond='data:blog.pageType != &quot;index&quot;'>
<meta expr:content='data:blog.title' property='og:site_name'/>
@zdienos
zdienos / Google Blogger Social Meta Tags.html
Created September 5, 2018 03:14 — forked from sverrirs/Google Blogger Social Meta Tags.html
Because it is notoriously difficult, here is how you integrate social media tags for Facebook, Twitter, Google+ and Pinterest into Google Blogger template. Tested and validated by myself on blogger.com in August 2015. This is based on https://gist.github.com/MilanAryal/92997b311580c6e96dd0 but with important fixes and different integration strat…
<!-- add the following code in the head and body tags -->
<head prefix='og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#'>
<body itemscope='itemscope' itemtype='http://schema.org/Blog' prefix='og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#'>
<!--
I've found easiest to simply include the rest of the tags in the body of the webpage.
The browser will automatically interpret the should-be header tags correctly.
The only problem, and unavoidable when using a blogger template is that the Pintrest markup
will not currently work with their Rich Pin validation tool.
@zdienos
zdienos / instagram_api.php
Created December 18, 2018 10:56 — forked from arturmamedov/instagram_api.php
Instagram API retrive access token with PHP curl
<?php
// yo can follow this guide to http://www.benrlodge.com/blog/post/how-to-generate-an-instagram-access-token#
#1 first you need to create a Client in Instgram Developer Dashboard
// https://www.instagram.com/developer/clients/manage/
#2 after you need to retrive a oAuth code for after get access_token
// https://www.instagram.com/developer/authentication/
// change the params with your one and open link in browser
@zdienos
zdienos / Home.php
Created March 10, 2019 10:20 — forked from whaone79/Home.php
Mengakses SQL Server 2008R2 dari PHP menggunakan CodeIgniter, silahkan lihat di http://w4w417.wordpress.com/2016/01/09/mengakses-sql-server-2008r2-dari-php-menggunakan-codeigniter/
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Home extends CI_Controller {
public function index()
{
$this->db = $this->load->database('default', TRUE);
$sql = "select ITM_CD,ITM_NAME,PRICE from dbo.RETAIL_ITEM ";
@zdienos
zdienos / media-query.css
Created March 21, 2019 02:01 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
/ip firewall address-list
add address=0.0.0.0/8 list=private-lokal
add address=10.0.0.0/8 list=private-lokal
add address=100.64.0.0/10 list=private-lokal
add address=127.0.0.0/8 list=private-lokal
add address=169.254.0.0/16 list=private-lokal
add address=172.16.0.0/12 list=private-lokal
add address=192.0.0.0/24 list=private-lokal
add address=192.0.2.0/24 list=private-lokal
add address=192.168.0.0/16 list=private-lokal
@zdienos
zdienos / Scale.js
Created April 24, 2019 10:59 — forked from DeVoresyah/Scale.js
Responsive Width & Height
import { Dimensions } from 'react-native';
const { width, height } = Dimensions.get('window');
const ScaleWidth = (scaleWidth) => {
const DESIGN_WIDTH = 180;
return (scaleWidth * width) / DESIGN_WIDTH
}
const ScaleHeight = (scaleHeight) => {
const DESIGN_HEIGHT = 180;