This file contains 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 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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<!-- ~/.fonts.conf for per-user font configuration --> | |
<fontconfig> | |
<alias binding="strong"> | |
<family>sans</family> | |
<prefer> | |
<family>Ubuntu</family> | |
<family>AR PL UMing TW</family> | |
<family>Noto Sans T Chinese</family> |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
$script = <<SCRIPT | |
#!/usr/bin/env bash | |
export DEBIAN_FRONTEND=noninteractive | |
echo '==> Preparing prerequisite...' | |
echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/60language |
This file contains 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 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 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 lsc | |
require! fs | |
require! request | |
require! prompt | |
{map} = require \prelude-ls | |
{spawn} = require \child_process | |
oauth_consumer_key = 'node script' |
This file contains 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
https://github.com/fourdollars/scripts/blob/master/ubuntu/dkms-helper.sh |
This file contains 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 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 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 sh | |
for master in $(nmblookup -M -- - | grep -v '^querying' | awk '{ print $1 }'); do | |
smbclient -U% -L $master 2>&1 1>/dev/null | grep '^Domain=' | head -n 1 | awk '{ split( $1, field, /[\[\]]/); print field[2] }' | |
done |