Skip to content

Instantly share code, notes, and snippets.

View leo424y's full-sized avatar

Fly Chang leo424y

View GitHub Profile
#include <cmath>
#include <functional>
#include <iostream>
using std::function;
using std::cout;
using std::endl;
template<class A> class optional {
bool _isValid;
@juliendargelos
juliendargelos / README-rails.md
Last active July 31, 2025 19:14
README.md template for Ruby on Rails projects
@b4284
b4284 / invoice107.jan.feb.sh
Created March 31, 2018 18:31
107年1~2月對獎程式
while read NUM; do
if [[ $NUM == "266" \
|| $NUM == "254" \
|| $NUM == "209" \
|| $NUM == "340" \
|| $NUM == "612" \
|| $NUM == "591" \
|| $NUM == "342" ]];
then
echo BINGOOOO
@taiansu
taiansu / 0_Outline.md
Last active March 24, 2019 04:21
Install Elixir and phoenix

Elixir 安装導覧

我們將安裝下列項目:

  1. Elixir
  2. Node.js
  3. Postgresql 資料庫
  4. Phoenix

由於 macOS 及 linux 可以使用 asdf 這個語言版本管理器,所以我們將介紹用它來安裝 elixir 及 nodejs 的方式。而 Windows 則會使用 chocolatey 來安裝。

反黑箱服貿協議・守護民主日與夜 直播人 更新人 g0v.today 每 3 分鐘更新, hackfoldr.org 每分鐘更新
https://web.archive.org/web/20140327051942/newday.tw 讓晨曦照亮民主 守護民主手環:important even
https://inlivetw.github.io/chrome inLiveTW 直播 最新資訊:important au
http://ecfa.speaking.tw/ 服貿跑馬燈 {"expand":false}
http://fact.g0v.tw/tisa.html 服貿跑馬燈-時間軸
http://ecfa.speaking.tw/imho.php 服貿東西軍 更新前請 *務必* 先刷新整頁試算表再改,感謝!
https://sites.google.com/site/twdstreet/ 公民審服貿 街頭民主審議:info
行動
http://123.g0v.today/ 三動作護台灣 致電立委:important ipa
http://appy.tw/ 割闌尾計畫 {"target": "_blank"} 罷免連署:important lee
@rbnpi
rbnpi / SpeakingMusicalClock.rb
Last active February 20, 2018 03:01
Sonic Pi 3 Musical Talking Clock tested on Pi3 and Mac. Requires download of samples http://r.newman.ch/rpi/clock/count2.zip Video of operation at https://youtu.be/N9v3V32cFU8
#Sonic Pi playing and speaking clock by Robin Newman version 0.8
#requires samples saying zero,1-20,30,40 and 50 saved in that order in a folder
#uses Ruby Time.now function to get time info. This is split up by functions
#hours, mins and secs to give three integer values (24 hour clock)
use_debug false
use_sched_ahead_time 0 #important no delays for a clock!
#adjust next four lines to select options
set :enabletenths,true
set :enablesecs,true
set :enablespeech,true
@satendra02
satendra02 / app.DockerFile
Last active November 19, 2024 17:28
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Set an environment variable where the Rails app is installed to inside of Docker image:
ENV RAILS_ROOT /var/www/app_name
RUN mkdir -p $RAILS_ROOT
# Set working directory, where the commands will be ran:
import React from 'react';
import {
StyleSheet,
TextInput,
TouchableOpacity,
Text,
KeyboardAvoidingView,
View,
} from 'react-native';
import { Permissions, Notifications } from 'expo';
#!/usr/bin/env python3
# 歸納法樣板
class InductionProof:
def induction(self, tabs, n):
if n == 1:
return tabs + self.base_case.replace("n", str(n))
else:
m = n-1
inductive_hypothesis = "\n".join(tabs + s for s in self.induction(tabs, m).split("\n"))
@kuanyui
kuanyui / vvv
Last active April 12, 2018 14:40
ssh -v -i ~/.ssh/company [email protected]
OpenSSH_7.5p1, OpenSSL 1.0.2m 2 Nov 2017
debug1: Reading configuration data /home/ono/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [192.30.253.113] port 22.
debug1: Connection established.
debug1: identity file /home/ono/.ssh/company type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ono/.ssh/company-cert type -1