Skip to content

Instantly share code, notes, and snippets.

View kvandake's full-sized avatar
🏠
Working from home

Alexey Nikitin kvandake

🏠
Working from home
View GitHub Profile
@kvandake
kvandake / wildfly-install.sh
Created January 20, 2016 10:34 — forked from sukharevd/wildfly-install.sh
Script to install JBoss Wildfly 10.x as service in Linux
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 10.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :2015-10-24T17:14-0700
#usage :/bin/bash wildfly-install.sh
#tested-version :10.0.0.CR3
#tested-distros :Debian 7,8; Ubuntu 15.10; CentOS 7; Fedora 22
@kvandake
kvandake / ImagePicker.java
Created October 18, 2016 07:50 — forked from Mariovc/ ImagePicker.java
Utility for picking an image from Gallery/Camera with Android Intents
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.media.ExifInterface;
* Reducing executable size:
http://developer.xamarin.com/guides/cross-platform/deployment,_testing,_and_metrics/memory_perf_best_practices/#Reducing_Executable_Size
* Use the linker (iOS [1], Android [2]) to remove unnecessary code from your assemblies
[1] https://developer.xamarin.com/guides/ios/advanced_topics/linker
[2] https://developer.xamarin.com/guides/android/advanced_topics/linking
* Reference third-party libraries judiciously
* Applying constraints to generics may reduce app size, since less code would need to be included (haven’t verified this)

Ruby on Rails Website Launch Checklist

Copy this gist and customise it to your liking.

  • Run Brakeman and resolve any issues where required
  • Run rails best practices and resolve any warnings
  • Run full test suite and make sure all tests are passing
  • Make sure no dummy email addresses are left in any notification emails (eg contact form)
  • Make sure production assets compile correct (eg files in vendor, etc, compile and are not 404'ing in production environment)
  • If using unicorn in production, make sure deploys are restarting the unicorns
@kvandake
kvandake / carrierwave_selectel.rb
Created February 28, 2019 13:33 — forked from leemour/carrierwave_selectel.rb
Carrierwave integration with Selectel using fog-openstack
CarrierWave.configure do |config|
if Rails.env.test? || Rails.env.cucumber?
config.storage = :file
config.enable_processing = false
else
config.asset_host = Rails.application.secrets.asset_host
config.fog_provider = 'fog/openstack'
config.fog_credentials = {
provider: 'OpenStack',
openstack_auth_url: 'https://api.selcdn.ru/v3',
@kvandake
kvandake / generate.js
Created July 28, 2019 14:21 — forked from dehamzah/generate.js
Generate secret key in NodeJS
require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex'); console.log(token); });