Skip to content

Instantly share code, notes, and snippets.

View bobo52310's full-sized avatar
🎯
Focusing

Bobo Chen (陳柏宏) bobo52310

🎯
Focusing
View GitHub Profile
@bobo52310
bobo52310 / mac-dev-playbook-config.yml
Last active May 13, 2022 08:33
Bobo's new macOS 安裝套件清單 with ansible
---
downloads: ~/.ansible-downloads/
configure_dotfiles: false
configure_terminal: false
configure_osx: false
# Set to 'true' to configure the Dock via dockutil.
configure_dock: false
dockitems_remove:
@bobo52310
bobo52310 / gist:687045522118af4c2e92ce8857146a04
Created November 15, 2018 07:42
How to jump to anchor BEFORE page loads completely?
// ref: https://stackoverflow.com/questions/43232931/how-to-jump-to-anchor-before-page-loads-completely
function autoScroll(name, animated, distance){
var scrollDistance = distance;
var scrollTarget = $("*[name='"+name+"']");
if(animated){
$('html, body').animate({scrollTop: (scrollTarget.offset().top - scrollDistance)}, 1300);
}
else{
@bobo52310
bobo52310 / feedly-elixir-phoenix-rss.opml
Created October 29, 2017 06:26
feedly-elixir-phoenix-rss.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Bobo's feeds of Elixir</title>
</head>
<body>
<outline text="Elixir Phoenix" title="Elixir Phoenix">
<outline type="rss" text="via @codeship" title="via @codeship" xmlUrl="http://blog.codeship.com/feed/" htmlUrl="https://blog.codeship.com"/>
<outline type="rss" text="元气糯米团子的Coding Blog" title="元气糯米团子的Coding Blog" xmlUrl="http://developerworks.github.io/atom.xml" htmlUrl="http://developerworks.github.io/"/>
@bobo52310
bobo52310 / gist:31f1bb146e4fcc4025c115ead2792d4f
Created July 28, 2016 09:34
elixir pipeline for enumeration
:inet.getif()
|> elem(1)
|> hd()
|> elem(1)
|> Tuple.to_list
|> Enum.join(".")
|> IO.inspect
# ip1 = :inet.getif()
# ip1 = elem(ip1, 1)
@bobo52310
bobo52310 / bobo_mac_apps.txt
Created June 5, 2016 02:39
Mac 上必裝的 Apps
1Password 6.app
Adobe Acrobat Reader DC.app
AppCleaner.app
Bartender 2.app
BetterTouchTool.app
Dropbox.app
Evernote.app
FileZilla.app
Firefox.app
Google Chrome.app
@bobo52310
bobo52310 / laracon2016.md
Last active March 7, 2016 03:19
Laracon EU2016

會議時間

8/23、8/24 兩天

預計出差日期

8/20~8/28 (台灣時間)

會議地點:

荷蘭 Amsterdam 2016年場館尚未公佈,參考2015年是舉辦在 Royal Tropical Institute(Mauritskade 63 1092 AD Amsterdam the Netherlands)

@bobo52310
bobo52310 / icdiff.md
Created January 9, 2016 05:45
Terminal 環境下更好用的檔案比較差異工具(diff tools) 推薦使用 `icdiff` 這一套

Terminal 環境下更好用的檔案比較差異工具(diff tools)

推薦使用 icdiff 這一套:https://github.com/jeffkaufman/icdiff

用法:

如何比較兩個檔案差異:

$icdiff <file_1> <file_2>

備註:覺得好用的話,可以將內建的 diff 指令改用 icdiff。

@bobo52310
bobo52310 / ubuntu-bootstrap.sh
Created October 12, 2015 00:37
ubuntu-bootstrap.sh 整理中...
#!/bin/bash
# Bobo's small script to automate the setup of a webdev ubuntu box
sudo -v #延長 root 密碼期限5分鐘
echo "=== 準備開始安裝... ==="
# update package sources
sudo apt-get update
# 安裝常用的工具 webdev-related software
@bobo52310
bobo52310 / gist:5bd63bead3d2026d6c3c
Created September 7, 2015 00:21
require kklibs autoloader before laravel autoloader
( ! ) Strict standards: Declaration of Illuminate\Foundation\Application::make() should be compatible with Illuminate\Container\Container::make($abstract, $parameters = Array) in /.amd_mnt/account/users/bobochen/projects/laravel5.1/vendor/laravel/framework/src/Illuminate/Foundation/Application.php on line 21
Call Stack
# Time Memory Function Location
1 0.0006 242784 {main}( ) ../index.php:0
2 1.6541 2538704 require_once( '/.amd_mnt/account/users/bobochen/projects/laravel5.1/bootstrap/app.php' ) ../index.php:36
3 1.6541 2539016 spl_autoload_call ( ) ../index.php:14
4 1.6541 2539072 Composer\Autoload\ClassLoader->loadClass( ) ../index.php:0
5 1.6541 2539072 Composer\Autoload\includeFile( ) ../ClassLoader.php:301
6 1.6542 2575768 include( '/.amd_mnt/account/users/bobochen/projects/laravel5.1/vendor/laravel/framework/src/Illuminate/Foundation/Application.php' ) ../ClassLoader.php:412
@bobo52310
bobo52310 / gist:c64f00d0a0af89a7eae1
Created July 16, 2015 04:06
[error]freebsd install laravel5.1 elixir
> node-sass@3.2.0 install /.amd_mnt/account/users/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass
> node scripts/install.js
Cannot download "https://github.com/sass/node-sass/releases/download/v3.2.0/freebsd-x64-0x000C_binding.node": HTTP error 404
> node-sass@3.2.0 postinstall /.amd_mnt/account/users/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass
> node scripts/build.js
Building: /.amd_mnt/account/users/bin/node node_modules/pangyp/bin/node-gyp rebuild --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gmake: Entering directory '/.amd_mnt/account/users/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/build'