Skip to content

Instantly share code, notes, and snippets.

@rafaftahsin
rafaftahsin / MainWinodw.xaml
Created October 7, 2015 08:06
Kinect WPF C# Program to count number of joints tracked in a body.
<Window x:Class="_32905277.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<TextBox Name="textBox" HorizontalAlignment="Left" Height="23" Margin="200,100,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="125"/>
</Grid>
</Window>
@rafaftahsin
rafaftahsin / response.xml
Created October 12, 2015 10:58
JSON Format of flickr API
<photos page="2" pages="89" perpage="10" total="881">
<photo id="2636" owner="47058503995@N01"
secret="a123456" server="2" title="test_04"
ispublic="1" isfriend="0" isfamily="0" />
<photo id="2635" owner="47058503995@N01"
secret="b123456" server="2" title="test_03"
ispublic="0" isfriend="1" isfamily="1" />
<photo id="2633" owner="47058503995@N01"
secret="c123456" server="2" title="test_01"
ispublic="1" isfriend="0" isfamily="0" />
┌───────────────────────────┬──────────────────────────┬────────────────────────┬───────────────────────┐
│ │ │ │ │
├───────────────────────────┼──────────────────────────┼────────────────────────┼───────────────────────┤
│ │ │ │ │
├───────────────────────────┼──────────────────────────┼────────────────────────┼───────────────────────┤
│ │ │ │ │
├───────────────────────────┼──────────────────────────┼────────────────────────┼───────────────────────┤
│ │ │ │ │
└───────────────────────────┴──────────────────────────┴────────────────────────┴───────────────────────┘
@rafaftahsin
rafaftahsin / Dockerfile
Created October 19, 2016 06:34 — forked from ju2wheels/Dockerfile
Docker Dockerfile reference template
# Last updated: 08/24/2916
#
# Total instructions available: 18
#
# https://docs.docker.com/engine/reference/builder/
#
# You can use a .dockerignore file in the same context directory as
# your Dockerfile to ignore files in the context before sending them
# to the Docker daemon for building to speed up building.
@rafaftahsin
rafaftahsin / bash-cheatsheet.sh
Created December 27, 2016 04:24 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
# Not Completed Yet
--------------------------------------------------------------------------------
WORKING WITH SERVICE
--------------------------------------------------------------------------------
systemctl stop servicename # Stop a running service
systemctl start service #Start a service
systemctl restart service #Restart a running service
systemctl reload service #Reload all config files in service
# https://www.youtube.com/watch?v=PwAGxqrXSCs&index=47&list=PLQVvvaa0QuDfKTOs3Keq_kaG2P55YRn5v
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("tmp/data/", one_hot=True)
n_nodes_hl1 = 500
n_nodes_hl2 = 500
n_nodes_hl3 = 500
@rafaftahsin
rafaftahsin / syncFilesystemToImage.sh
Created December 20, 2017 09:44 — forked from geoffreyanderson/syncFilesystemToImage.sh
A script to rsync a running Linux OS to an image file (specifically, a 10GB image file for deployment to AWS EC2).
#!/bin/bash
# Run this script on a running Linux OS that you want to be put into an image file.
# Ensure that the system you run this on is less than 10GB in size if you wish to
# deploy the image file to AWS EC2.
# Note: This is based on Michael Fairchild's instance-to-ebs-ami.sh script.
# -https://gist.github.com/249915
imageFile=${1:-"awsImage-$(date +%m%d%y-%H%M).img"}
imageMountPoint=${2:-'/mnt/image'}
extraFilesArchive=${3:-'awsInstanceFiles.tar.gz'}
stage('Stage Name') {
steps {
build(job: 'pipeline.name', parameters: [string(name: 'DEPLOY_TO', value: "test")])
}
}
@rafaftahsin
rafaftahsin / SeedData.cs
Created November 20, 2018 05:14
SqliteDB to PostGRE Database seeding with C# ASP.NET Core 2.1 MVC
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace SqliteToPostGre.Models
{
public class SeedData