Skip to content

Instantly share code, notes, and snippets.

View ugifractal's full-sized avatar

sugiarto ugifractal

View GitHub Profile
{{ page_content }}
{{current_page.title}} #menampilkan judul halaman
{{current_page.uname}} #menampilkan nama unik untuk akses URL
{% if current_product %}
Produk tersedia
{% else %}
Produk tidak tersedia
{% endif %}
{% judul = 'selamat datang di web kami' %}
<html>
<head>
<title>{{ judul }}</title>
</head>
<body>
</body>
</html>
{% latest_pages jumlah_halaman %}
#contoh
{% latest_pages 10 %}
{% sub_part nama_sub_halaman %}
#contoh
{% sub_part 'footer' %}
{% twitter_widget nama_akun_twitter %}
# contoh:
{% twitter_widget 'webmuapp' %}
{% paginator products %}
@ugifractal
ugifractal / util.rb
Created November 22, 2018 13:46
ruby Method using Faraday to send push notification on onesignal API
def self.onesignal_notify(user, message)
headers = {
"Authorization" => "BASIC #{APP_CONFIG['onesignal']['api_key']}",
"Content-Type" => "Application/json"
}
body = {
"app_id" => APP_CONFIG['onesignal']['app_id'],
"data" => {"type": "post"},
"contents" => {"en" => message},
#"include_player_ids" => [user.onesignal],
@ugifractal
ugifractal / fix.txt
Created June 29, 2019 02:21
fixing react-native version mismatch
yarn react-native upgrade
rm -rf node_modules
yarn
expo client:install:android
expo start