Skip to content

Instantly share code, notes, and snippets.

View tuttelikz's full-sized avatar
🔨
生き甲斐

San Askaruly tuttelikz

🔨
生き甲斐
View GitHub Profile
@tuttelikz
tuttelikz / fuseImages.m
Created May 14, 2019 00:24
This is gist to overlay images onto each other and compare fuse
img_fused = imfuse(img1,img2,'falsecolor','Scaling','joint','ColorChannels',[1 2 0]);
clear all, close all, clc
%% read the image
x = imread('balls.jpg');
x = imresize(x, 0.3);
figure()
imshow(x)
@tuttelikz
tuttelikz / permission_definition
Created May 25, 2018 04:03
The following lines show which permissions to define for resolving some of the errors in Android.
// Solves this mentioned error:
// android.os.FileUriExposedException: file:///storage/emulated/0/test.txt exposed beyond app through Intent.getData()
// Inside Manifest, define following permissions:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
@tuttelikz
tuttelikz / calculate_time_difference.java
Last active May 23, 2018 05:05
The script to calculate time difference in Android
String tStart = "09:27:37";
String tFinish = "15:24:04";
String[] sTimeHourMinSec = tStart.split(":");
int sHour = Integer.valueOf(sTimeHourMinSec[0]);
int sMin = Integer.valueOf(sTimeHourMinSec[1]);
int sSec = Integer.valueOf(sTimeHourMinSec[2]);
String[] fTimeHourMinSec = tFinish.split(":");
int fHour = Integer.valueOf(fTimeHourMinSec[0]);
@tuttelikz
tuttelikz / req_html.html
Last active May 3, 2018 09:07
Basic template for copying and pasting into html script
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Raleway" />
<link href="/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
</body>
@tuttelikz
tuttelikz / kill_node_error
Created May 2, 2018 04:38
Gist to fix error on listening node
killall node
@tuttelikz
tuttelikz / update_sublime
Created May 2, 2018 03:14
Commands to update sublime
Install the GPG key:
*********************************************************************
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
*********************************************************************
Ensure apt is set up to work with https sources:
*********************************************************************
sudo apt-get install apt-transport-https
*********************************************************************
@tuttelikz
tuttelikz / mongo_cmd.txt
Last active May 2, 2018 03:57
Gist to show mongo commands
// Display elements of specific collection
show dbs
use <db name>
show collections
// Display elements of specific collection
db.collectionName.find
// Remove all elements from specific collection
db.collectionName.remove({})
@tuttelikz
tuttelikz / different_versions_d3
Created April 30, 2018 07:01
Simple gist showing how to insert d3 charts of different versions into same html page
// First declare third version as a separate variable
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
d3version3 = d3
window.d3 = null
</script>
// Then declare fourth version as a separate variable
@tuttelikz
tuttelikz / create_duplicate_project_git
Created April 29, 2018 04:01
This is a gist demonstrating how you can create a duplicate of a project
In your case, I would suggest going with [submodules](https://stackoverflow.com/a/19279658/403401). However to answer your exact question, here's how you should proceed.
1. Start by creating `Jeremy/MyShooter` and `Jeremy/MyRPG` on Github. Keep them empty.
2. Clone your origin project on your system, twice, giving it different names
$ git clone http://github.com/Bob/CoolFramework MyShooter
$ git clone http://github.com/Bob/CoolFramework MyRPG