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 perl | |
use File::Find; | |
use File::Copy; | |
use v5.14; | |
use strict; | |
my $path = shift @ARGV || '.'; | |
find({wanted => \&wanted, preprocess => \&preprocess}, $path); |
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
const path = require('path') | |
const fs = require('fs-extra') | |
const {debug, log, ERROR} = require('../debug')('NuxtGenerator') | |
var resolve = path.resolve | |
process.env.DEBUG = 'nuxt:*,Vuetal:*' | |
class NuxtGenerator { |
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
strategy: nuxt | |
source_dir: site | |
target_dir: dist | |
api_point: api | |
basename: / | |
permalink: /:year/:month/:day/:slug | |
extensions: [".md", ".markdown", ".json", ".html"] | |
collections: | |
pages: | |
type: page |
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 python | |
import sys | |
# Basic recursion | |
def fibonacci (n): | |
def imp (n): | |
if n == 0: return 0 | |
if n == 1: return 1 | |
return imp(n-1) + imp(n-2) |
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/bash | |
find "$1" -d | while read x; do | |
basename=$(basename "$x") | |
dirname=$(dirname "$x") | |
newname=$(echo $basename | iconv -c -f utf-8 -t cp866 | iconv -f cp949 -t utf-8) | |
if [ "$basename" != "$newname" ];then | |
mv "$dirname/$basename" "$dirname/$newname" | |
fi | |
done |
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
------------------------------------------------- == ------------------------------------------------- == | |
nench.sh v2018.04.14 -- https://git.io/nench.sh == nench.sh v2018.04.14 -- https://git.io/nench.sh == | |
benchmark timestamp: 2018-11-18 10:05:43 UTC == benchmark timestamp: 2018-11-18 10:06:45 UTC == | |
------------------------------------------------- == ------------------------------------------------- == | |
== == | |
Processor: Intel(R) Xeon(R) CPU E5-2687W v4 @ 3.00GHz == Processor: Virtual CPU 714389bda930 == | |
CPU cores: 1 |
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
vim -c TOhtml -c wq -c q TxJSON.cxx | |
vim -c 'hardcopy > o1.ps' -c q TxJSON.cxx | |
a2ps --pro=color -o o2.ps TxJSON.cxx |
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
{ | |
"title": "Change fn + esc to grave_accent_and_tilde", | |
"rules": [ | |
{ | |
"description": "Change fn + esc grave_accent_and_tilde", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "escape", |
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/bash | |
function ensure_privileged_or_exit() { | |
local cap_mask="0x00000007ffffffff" | |
local cap_bnd=0x$(grep ^CapBnd /proc/self/status | awk '{print $2}') | |
if [[ $(($cap_mask & $cap_bnd )) != $(($cap_mask)) ]]; then | |
echo -e "[ERROR] Run with --privileged option." | |
exit 1 | |
fi | |
} |
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
foo ?= default | |
override foo += added | |
export foo | |
all:: | |
@echo outer: foo is "$(foo)" | |
@$(MAKE) -s -f sub-make.mk |