Skip to content

Instantly share code, notes, and snippets.

View tamimibrahim17's full-sized avatar
🎯
Focusing

Tamim Ibrahim tamimibrahim17

🎯
Focusing
  • Tikweb
  • Bangladesh
View GitHub Profile
Notice: wpdb::prepare was called incorrectly. Unsupported value type (object). Please see Debugging in WordPress for more information. (This message was added in version 4.8.2.) in /srv/www/idapublishing.shop/www/wordpress/wp-includes/functions.php on line 4147
Warning: mysqli_real_escape_string() expects parameter 2 to be string, object given in /srv/www/idapublishing.shop/www/wordpress/wp-includes/wp-db.php on line 1102
Notice: Trying to get property of non-object in /srv/www/idapublishing.shop/www/wordpress/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 559
Warning: Illegal offset type in isset or empty in /srv/www/idapublishing.shop/www/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 247
Notice: wpdb::prepare was called incorrectly. Unsupported value type (object). Please see Debugging in WordPress for more information. (This message was added in version 4.8.2.) in /srv/w
@tamimibrahim17
tamimibrahim17 / convert-mp3-frm-webm.txt
Created February 24, 2018 17:27
Convert webm to mp3
FILE="the-file-location.webm"
ffmpeg -i "${FILE}" -vn -ab 128k -ar 44100 -y "${FILE%.webm}.mp3"
@tamimibrahim17
tamimibrahim17 / ffmpeg-compress-mp4
Created February 26, 2018 18:30 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@tamimibrahim17
tamimibrahim17 / google.sh
Created March 29, 2018 10:56 — forked from deanet/google.sh
Uploading File into Google Drive (because grive too many dependencies qt, xorg ? )
#!/bin/bash
## uploading to google
## rev: 22 Aug 2012 16:07
det=`date +%F`
browser="Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1"
username="[email protected]"
password="password"
accountype="HOSTED" #gooApps = HOSTED , gmail=GOOGLE
@tamimibrahim17
tamimibrahim17 / index.html
Created April 23, 2018 11:56
input number custom style
<div class="quantity">
<input type="number" min="1" max="9" step="1" value="1">
</div>
@tamimibrahim17
tamimibrahim17 / index.slim
Created April 23, 2018 11:57
Input number custom
.wrapper
input type="number" value="1"/
span.input-button.add +
span.input-button.remove -
.infos Try to shift + click
<div class="group">
<div class="input-number" min="0" max="10">
<input type="text" value="1" />
<button class="input-number-increment" data-increment></button>
<button class="input-number-decrement" data-decrement></button>
</div>
</div>
@tamimibrahim17
tamimibrahim17 / 0_urllib2.py
Created April 30, 2018 10:38 — forked from kennethreitz/0_urllib2.py
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
<?php
class GF_Field_Mailpoet extends GF_Field {
public $type = 'mailpoet';
public function get_form_editor_field_title() {
return esc_attr__( 'Mailpoet List', 'gravityforms' );
}
<?php
// this will convert file lines into a big array. So, if your file has 1000 lines the array count will be 1000
// if your file size 20 MB than this method will occupy 20MB of system ram .
$lines = file('big_file.txt');
// Now we are going to chunk the lines by 100000 on each chunk
// array_chunk will create a multi demential array with chunked line on array.
$chunked = array_chunk($lines,100000);