Skip to content

Instantly share code, notes, and snippets.

View febridev's full-sized avatar
💭
Learning Some Data Engineer

febriyant abidin febridev

💭
Learning Some Data Engineer
View GitHub Profile
Directions:
1. Insert your Windows 10 DVD, or double click its ISO image, or insert your bootable flash drive with Windows 10, depending on what you have.
2. Open 'This PC' in File Explorer and note the drive letter of the installation media you have inserted. In my case it is disk I:
3. Open CMD with administrative privileges and type the following command:
Dism /online /enable-feature /featurename:NetFx3 /All /Source:X:\sources\sxs /LimitAccess
ALTER TABLE mytable CHANGE columnName columnName TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
@febridev
febridev / countries.sql
Created January 24, 2018 02:49 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
set @newid=0;
update users set ID = (@newid:=@newid+1) order by ID;
@febridev
febridev / php.ini
Created July 7, 2017 03:21
koneksi php ke microsoft sql server windows
Ketika kita terbiasa menggunakan XAMPP, adakalanya ketika kita diharuskan membuat sistem yang terkoneksi ke SQLServer 2008, secara normal XAMPP 1.7.7-VC9 tidak bisa langsung melakukan koneksi ke SQLServer 2008. Ada beberapa langkah yang harus kita lakukan.
1. Buka file php.ini di “xampp/php/php.ini”.
2. Cari dan aktifkan “extension=php_mssql.dll” dan “extension=php_pdo_mssql.dll” dengan menghilangkan tanda titik koma (;)
3. Download file php_mssql.zip
4. Extract file tersebut dan rename (sesuaikan nts atau ts PHP XAMPP kita), dimana file yang direname (dicontohkan yang ts):
@febridev
febridev / .htaccess
Created May 17, 2017 06:02
set php_value upload_max_filesize and php_value post_max_size
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
<Files .env>
Order allow,deny
Deny from all
@febridev
febridev / controller.php
Created April 3, 2017 16:18
eloquent laravel group by year
// Carbon
use Carbon\Carbon;
$visitorTraffic = PageView::select('id', 'title', 'created_at')
->get()
->groupBy(function($date) {
return Carbon::parse($date->created_at)->format('Y'); // grouping by years
//return Carbon::parse($date->created_at)->format('m'); // grouping by months
});
@febridev
febridev / gist:642e37d02f3be6c462e65f1e1d5a89c9
Created March 30, 2017 01:58
run call artisan outside command
Route::get('/clear-cache', function() {
$exitCode = Artisan::call('cache:clear');
// return what you want
});
@febridev
febridev / auto-fixed-navbar-then-scroll.html
Created March 23, 2017 07:17
auto-fixed-navbar-then-scroll.html
<style>
menu {
background:#345;
color:#FFF;
height:2em;
padding:.5em;
position:absolute;
top:150px;
width:100%;
}
@febridev
febridev / iframe.html
Created March 21, 2017 13:44
scroll off google maps
<!DOCTYPE html>
<html>
<head>
<style>
.scrolloff {
pointer-events: none;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>