Skip to content

Instantly share code, notes, and snippets.

View tokoiwesley's full-sized avatar

Wesley Tokoi tokoiwesley

View GitHub Profile
@tokoiwesley
tokoiwesley / android_device_id.java
Created March 21, 2022 13:18
Generate a unique Android Device ID
String s = Build.BOARD.length() % 10 +
Build.BRAND.length() % 10 +
Build.DEVICE.length() % 10 +
Build.DISPLAY.length() % 10 +
Build.HOST.length() % 10 +
Build.ID.length() % 10 +
Build.MANUFACTURER.length() % 10 +
Build.MODEL.length() % 10 +
Build.PRODUCT.length() % 10 +
Build.TAGS.length() % 10 +
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/path/to/executable
Name=Name of Application
Icon=/path/to/icon
{"keys": ["tab"], "command": "expand_abbreviation_by_tab", "context":
[
{ "operand": "source.js", "operator": "equal", "match_all": true, "key": "selector" },
{ "match_all": true, "key": "selection_empty" },
{ "operator": "equal", "operand": false, "match_all": true, "key": "has_next_field" },
{ "operand": false, "operator": "equal", "match_all": true, "key": "auto_complete_visible" },
{ "match_all": true, "key": "is_abbreviation" }
]
}
##
## How to install mcrypt in php7.2 / php7.3
## Linux / MacOS / OSX
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
#
##
## How to install mcrypt in php7.2 / php7.3
## Linux / MacOS / OSX
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
#
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Postman
Icon=/opt/Postman/app/resources/app/assets/icon.png
Path=/opt/Postman
Exec=/opt/Postman/Postman
StartupNotify=false
StartupWMClass=Postman
Solution:
wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb \
&& sudo dpkg -i /tmp/libpng12.deb \
&& sudo rm /tmp/libpng12.deb

Keybase proof

I hereby claim:

  • I am tokoiwesley on github.
  • I am tokoiwesley (https://keybase.io/tokoiwesley) on keybase.
  • I have a public key ASD9o4EvfAUCkBK2xITLfApK32fyIPl6Pf4n3ZWYJli2jAo

To claim this, I am signing this object:

@tokoiwesley
tokoiwesley / simple-semantic-ui.blade.php
Created February 14, 2018 08:45
Simple Semantic UI Pagination in Laravel
<?php
/**
* Semantic UI
* @example $pages->links('vendor.pagination.simple-semantic-ui', ['paginator' => $pages])
* @example @include('vendor.pagination.simple-semantic-ui', ['paginator' => $pages])
**/
?>
@if ($paginator->lastPage() > 1)
<div class="ui pagination menu">
@for ($i = 1; $i <= $paginator->lastPage(); $i++)
@tokoiwesley
tokoiwesley / semantic-ui.blade.php
Last active February 14, 2018 08:43
Semantic UI Pagination in Laravel
<?php
/**
* Semantic UI
* Includes previous and next buttons
* @example $pages->links('vendor.pagination.semantic-ui', ['paginator' => $pages])
* @example @include('vendor.pagination.semantic-ui', ['paginator' => $pages])
*
* @link https://semantic-ui.com/collections/menu.html#inverted Inverted styles
* @see <div class="ui pagination inverted blue menu"> Inverted blue menu
**/