Skip to content

Instantly share code, notes, and snippets.

View arifikhsan's full-sized avatar
🏡
Cool and Focusing

Arif Ikhsanudin arifikhsan

🏡
Cool and Focusing
View GitHub Profile
@aagarwal1012
aagarwal1012 / flutter-ci.yml
Last active March 23, 2024 11:54
CI for your Flutter apps on GitHub Actions.
name: Flutter CI
# This workflow is triggered on pushes to the repository.
on:
push:
branches:
- master
# on: push # Default will running for every branch.
@ArthurNagy
ArthurNagy / RoundedBottomSheetDialogFragment.kt
Last active March 19, 2023 08:14
Rounded modal bottom sheet as seen in new Google products(Tasks, News, etc.), described in this article: https://medium.com/halcyon-mobile/implementing-googles-refreshed-modal-bottom-sheet-4e76cb5de65b
package com.your.package
import android.app.Dialog
import android.os.Bundle
import com.your.package.R
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
/**
* BottomSheetDialog fragment that uses a custom
@peanutbutterandcrackers
peanutbutterandcrackers / OpenShot Zero to Hero.md
Last active September 27, 2020 08:14
A guide to OpenShot Mastery

OpenShot: Zero to Hero

This guide aims to give you all the resources you need in order to become a video editing ninja, using OpenShot.

The Basics:

Here is a primer to get you started with OpenShot, made by Jonathan Thomas, the creator of OpenShot, himself. The user guide is also available online. The following links will help you understand and use OpenShot:

  1. A quick video to demonstrate the OpenShot workflow.
  2. An in-depth beginners guide to OpenShot I
  3. An in-depth beginners guide to OpenShot II
  4. A guide to trimming and slicing videos in OpenShot
@oliverbth05
oliverbth05 / app.css
Last active September 9, 2022 20:39
Vuetify Responsive Toolbar with Navigation Drawer
#drawer{
background: rgba(240, 240, 240, 1);
}
@cdesch
cdesch / rails_generator_cheat_sheet.md
Last active March 30, 2024 09:07
Rails Generator CheatSheet

Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.

Command Line Generator Info

Reference

You can get all of this information on the command line.

rails generate with no generator name will output a list of all available generators and some information about global options. rails generate GENERATOR --help will list the options that can be passed to the specified generator.

@zulhfreelancer
zulhfreelancer / heroku_pg_db_reset.md
Last active January 29, 2024 10:09
How to reset PG Database on Heroku (for Rails app)?

It's important to note that running this reset will drop any existing data you have in the application

How to reset PG Database on Heroku?

  • Step 1: heroku restart
  • Step 2: heroku pg:reset DATABASE (no need to change the DATABASE)
  • Step 3: heroku run rake db:migrate
  • Step 4: heroku run rake db:seed (if you have seed)

One liner

@tristanm
tristanm / README.md
Last active March 10, 2024 20:11
Migrating a Rails project from MySQL to PostgreSQL

Migrating a Rails project from MySQL to PostgreSQL

This brief guide is written from my own experience with migrating a large (~5GB) MySQL database to PostgreSQL for a Rails project.

No warranties, guarantees, support etc. Use at your own risk and, as always, ENSURE YOU MAKE BACKUPS FIRST!

I chose [pgloader][1] because it's extremely fast. YMMV.

  1. Replace mysql2 gem with pg in Gemfile.
  2. Update config/database.yml for PostgreSQL. I used [Rails' template][2] as a starting point.
@hopsoft
hopsoft / db.rake
Last active April 3, 2024 13:13
Rails rake tasks for dump & restore of PostgreSQL databases
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd
@emil2k
emil2k / Connectivity.java
Last active December 22, 2023 06:03
Android utility class for checking device's network connectivity and speed.
/*
* Copyright (c) 2017 Emil Davtyan
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions: