This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# System defaults for abcde version 2.8.1 | |
# Nothing in this file is uncommented by default. | |
# | |
# If you wish to override these system-wide settings, create your own | |
# .abcde.conf file in your home directory. | |
# CDDB options | |
# Choose whether you want to use "cddb" and/or "musicbrainz". Default | |
# is "musicbrainz", but both can be specified in a comma delimited list | |
# to be tried sequentially in the event of failure of the first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function load_efi_video { | |
set gfxmode=auto | |
insmod efi_gop | |
insmod efi_uga | |
insmod gfxterm | |
terminal_output gfxterm | |
} | |
function load_video { | |
set gfxmode=auto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function load_efi_video { | |
set gfxmode=auto | |
insmod efi_gop | |
insmod efi_uga | |
insmod gfxterm | |
terminal_output gfxterm | |
} | |
function load_video { | |
set gfxmode=auto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MachineBox extends React.Component { | |
render(){ | |
return ( <div>Hello From React </div> ); | |
} | |
} | |
let target = document.getElementById('machine-box'); | |
ReactDOM.render( | |
<MachineBox />, target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
read -p 'Enter a number : ' num | |
seq $((10**num)) | egrep -v "([0-9]).*\1" | xargs echo | sed 's/ /, /g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import random, re | |
collection = ('A1-1', 'A1-2', 'A1-3', 'A1-4', 'A1-5', 'A1-6', 'A1-7', 'A1-8', 'A1-9', 'A1-10', 'A1-11', 'A1-12', 'A1-13', 'A1-14', 'A2-1', 'A2-3', 'A2-4', 'A2-5', 'A2-6', 'A2-7', 'A2-8', 'A2-9', 'A2-10', 'A2-11', 'A2-12', 'A2-13', 'A2-14', 'A3-1', 'B1-3', 'B1-4', 'B1-5', 'B1-6', 'B1-7', 'B1-8', 'B1-9', 'B1-10', 'B1-11', 'B1-12', 'B2-3', 'B2-4', 'B2-5', 'B2-6', 'B2-7', 'B2-8', 'B2-9', 'B2-10', 'B2-11', 'B2-12') | |
print('<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>機車腳踏車車位選填志願抽籤結果</title>') | |
print('''<style> | |
table {border: 0; border-collapse: collapse; width: 100%; table-layout: fixed;} | |
td,th {border: 1px solid black;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var scores = [98, 74, 85, 77, 93, 100, 89]; | |
var total = 0; | |
for (var score in scores) { | |
total += score; | |
} | |
var mean = total / scores.length; | |
console.log(mean); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Scene(context, width, height, images) { | |
this.context = context; | |
this.width = width; | |
this.height = height; | |
this.images = images; | |
this.actors = []; | |
} | |
Scene.prototype.register = function(actor) { | |
this.actors.push(actor); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
def find_duplicate(vbt_min, pwm_max): | |
prev = -1 | |
pwm_min = round(vbt_min * pwm_max / 255) | |
print("sysfs : PWM") | |
print("-----------") | |
for i in range(pwm_max + 1): | |
pwm = round(i * (pwm_max - pwm_min) / pwm_max + pwm_min) | |
if prev == pwm: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PARTITIONS="/dev/mmcblk0p1 /dev/mmcblk1p1 /dev/nvm0n1p1 /dev/nvm0n2p1 /dev/sda1 /dev/sdb1" | |
DEVICES="/dev/sdb /dev/nvm0n2 /dev/nvm0n1 /dev/mmcblk0" | |
result="" | |
[...] # can not use PARTITIONS here | |
for partition in $PARTITIONS; do |