Skip to content

Instantly share code, notes, and snippets.

View wgsjack199213's full-sized avatar

WGS wgsjack199213

  • Beijing, PRC
View GitHub Profile
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Returns the result of the shell command
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111
@wgsjack199213
wgsjack199213 / say.sh
Created February 15, 2016 06:55 — forked from zshbleaker/say.sh
say command in OS X
say --voice="Agnes" Isn't it nice to have a computer that will talk to you?
say --voice="Albert" I have a frog in my throat. No, I mean a real frog!
say --voice="Alex" Most people recognize me by my voice.
say --voice="Alice" Salve, mi chiamo Alice e sono una voce italiana.
say --voice="Alva" Hej, jag heter Alva. Jag är en svensk röst.
say --voice="Amelie" Bonjour, je m ’ appelle Amelie. Je suis une voix canadienne.
say --voice="Anna" Hallo, ich heiße Anna und ich bin eine deutsche Stimme.
say --voice="Bad News" The light you see at the end of the tunnel is the headlamp of a fast approaching train.
say --voice="Bahh" Do not pull the wool over my eyes.
say --voice="Bells" Time flies when you are having fun.
@wgsjack199213
wgsjack199213 / 0_reuse_code.js
Created August 18, 2017 06:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@wgsjack199213
wgsjack199213 / shm.py
Created December 20, 2022 17:52 — forked from jakirkham/shm.py
Some Python ctypes-based POSIX shared memory functions
import ctypes
import mmap
import os
import stat
import sys
try:
unicode
except NameError: