Skip to content

Instantly share code, notes, and snippets.

View timfanda35's full-sized avatar
🐻
Fly to the moon.

Bear Su timfanda35

🐻
Fly to the moon.
View GitHub Profile
@timfanda35
timfanda35 / create_branch_develop.sh
Last active August 29, 2015 13:56
Bear 實驗室: 什麼是Git flow ? 如何在SourceTree使用Git flow管理開發! http://www.takobear.tw/12/post/2014/02/bear-git-flow-sourcetreegit-flow.html
git checkout -b develop master
@property (weak) IBOutlet NSTextField *message;
@property (weak) IBOutlet NSTextField *yourname;
- (IBAction)submit:(id)sender;
#!/usr/bin/env ruby
require 'mail'
mysql_username = 'root'
mysql_password = '123456'
mysql_database = 'test'
system("mysqldump --user=#{mysql_username} --password=#{mysql_password} --single-transaction #{mysql_database} > backup.sql")
# Credit to :
<iframe id="_if3" scrolling="no" style="width : 100%" ></iframe>
<script>
(function() {
var oIf = document.getElementById('_if3'),
win = oIf.contentWindow,
doc = oIf.contentWindow.document;
doc.write('<html><head></head><body><script> google_ad_client = "pub-1821434700708607"; google_ad_slot = "8156194155"; google_ad_width = 200; google_ad_height = 200; </sc' + 'ript><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></sc' + 'ript>');
if(doc.all) {
# capistrano deployment
require "bundler/capistrano"
require "capistrano/ext/multistage"
set :stages, %w(canary production)
set :default_stage, "canary"
set :application, "lolcats"
set :deploy_to, "/srv/#{application}"
require 'bundler/capistrano'
set :application, "net"
set :repository, "git@githost.com:net.git"
set :scm, :git
set :default_environment, {
'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
}
@timfanda35
timfanda35 / Rakefile
Created October 6, 2015 09:11 — forked from ream88/Rakefile
Minitest rake task
require 'rake'
require 'rake/testtask'
Rake::TestTask.new do |t|
t.test_files = Dir.glob('spec/**/*_spec.rb')
end
task(default: :test)
@timfanda35
timfanda35 / aarv.sh
Created June 6, 2016 12:41
Show android .aar version informations
#!/bin/bash
xml=`unzip -p $1 AndroidManifest.xml`
echo $xml | grep -Eo "android:versionCode=\"[^\"]+\""
echo $xml | grep -Eo "android:versionName=\"[^\"]+\""
@timfanda35
timfanda35 / Gold.md
Last active January 3, 2017 11:44 — forked from sean2121/Gold.md

Ruby Association Certified Ruby Examination Gold Sample Questions

Q1. Assume that the following code must have the stated execution result.

__(1)__
x.each_line { |line| puts line }

[Execution Result]
apple
@timfanda35
timfanda35 / install-kubeflow-on-gke.sh
Last active April 25, 2018 09:31
Snippet for installing kubeflow on GKE
#! /bin/bash
# Requirement
#
# * gcloud SDK https://cloud.google.com/sdk/downloads
# * kubectl https://kubernetes.io/docs/tasks/tools/install-kubectl/
# * ksonnet https://ksonnet.io/
#
# * Request GPU Quota in Cloud Console
#