Skip to content

Instantly share code, notes, and snippets.

@anestan
anestan / vim-shortcuts.md
Created October 28, 2022 05:50 — forked from tuxfight3r/vim-shortcuts.md
VIM SHORTCUTS

VIM KEYBOARD SHORTCUTS

MOVEMENT

h        -   Move left
j        -   Move down
k        -   Move up
l        -   Move right
$        -   Move to end of line
0        -   Move to beginning of line (including whitespace)
@anestan
anestan / Function.Array-Group-By.php
Created March 16, 2022 08:09 — forked from mcaskill/Function.Array-Group-By.php
PHP : Groups an array by a given key
<?php
if (!function_exists('array_group_by')) {
/**
* Groups an array by a given key.
*
* Groups an array into arrays by a given key, or set of keys, shared between all array members.
*
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function.
* This variant allows $key to be closures.
@anestan
anestan / resources-web-developers-designers.md
Created January 14, 2022 08:32 — forked from kevinwhoffman/resources-web-developers-designers.md
Resources for Web Developers and Designers

Resources for Web Developers and Designers

This is an incomplete list of resources including courses and individuals who publish content that has helped me grow as a web developer and designer. Many of these resources are WordPress-specific as that is my current area of specialization. This list will grow over time. If you've got something to add, send me a link @kevinwhoffman and I'll check it out!

Course Providers

@anestan
anestan / kesehatan.md
Last active October 28, 2019 04:31
kesehatan.md

Kolesterol

Berikut makanan pantangan kolesterol tinggi, yang perlu untuk dihindari.

  1. gorengan, martabak telor, ayam goreng kulitnya
  2. lemak jenuh -> santan kelapa, daging kemasan ( kornet & sosis, mentega ) -> yang bagus minyak zaitun
  3. lemak trans (minyak yg dipadatkan) -> biskuit asin (crackers), kue kering manis (cookies), roti dan donat
  4. jeroan (ayam dan sapi) -> hati, otak, usus, ampela, jantung dan organ dalam lainnya.
  5. kulit ayam, sapi, kikil mengangdung lemak jenuh yang lebih tinggi dari daging nya.
  6. kuning telor ( lebih baik pilih protein dari tahu dan tempe )
  7. junk food ( kentang goreng, ayam goreng tepung, burger )
@anestan
anestan / phptosqlserver
Last active December 3, 2018 06:54
connect php 7 to sql server 2014
# download ini di github
https://github.com/microsoft/msphpsql/releases
* sesuaikan dengan php versionnya, check di
http://localhost/dashboard/phpinfo.php
https://github.com/Microsoft/msphpsql/releases/download/v5.3.0/Windows-7.0.zip
* extract zip folder nya, lalu pilih folder sesuai tipe xampp nya. (tipe nya 32 bit di gw)
`php_pdo_sqlsrv_7_ts.dll` copy lalu taro di xampp/php/ext
@anestan
anestan / infor.sql
Last active November 27, 2018 07:45
sql server infor
# how to check item untuk obsolete
select item, description, show_in_drop_down_list, reason_code, stat from item_mst where item='12-01-AA05-00001';
# untuk update item jadi active dan bisa di select
update item_mst set stat='A', show_in_drop_down_list=1, reason_code='' where item='12-01-AA05-00001';
# untuk membuat item jadi obsolete
update item_mst set stat='O', show_in_drop_down_list=0, reason_code='A02' where item='12-01-AA05-00001';
@anestan
anestan / webdev.md
Created October 10, 2018 07:28 — forked from GoodGuyNick/webdev.md
Web Dev
@anestan
anestan / datatableajaxlaravel.php
Last active January 17, 2018 01:47
datatable ajax laravel
```php
<?php
// Untuk Index SPK using Ajax
public function allSpk(Request $request)
{
$columns = array(
0 => 'start_date',
1 => 'end_date',
2 => 'spkclosed_date',
3 => 'spk_no',
@anestan
anestan / directprinting.php
Last active February 13, 2024 08:04
direct printing php dot matrix
<?php
//set printing option to raw
$tmpdir = sys_get_temp_dir(); # ambil direktori temporary untuk simpan file.
$file = tempnam($tmpdir, 'ctk'); # nama file temporary yang akan dicetak
$handle = fopen($file, 'w');
$condensed = Chr(27) . Chr(33) . Chr(4);
$bold1 = Chr(27) . Chr(69);
$bold0 = Chr(27) . Chr(70);
$initialized = chr(27).chr(64);