Skip to content

Instantly share code, notes, and snippets.

View yanyingwang's full-sized avatar
🈲
恶灵静退散 水逆变火箭 🚀 --->

Yanying Wang yanyingwang

🈲
恶灵静退散 水逆变火箭 🚀 --->
View GitHub Profile
@Ocawesome101
Ocawesome101 / baytrail-audio.sh
Last active November 18, 2023 10:06
A script to enable audio for Baytrail Chromebooks. Made and tested on Manjaro Linux but has some level of package manager detection.
#!/bin/bash
# A script to make Baytrail Chromebooks' audio work (mostly) on most Linux
# distros. Tested on Manjaro and Ubuntu.
set -e
if ! [ -e "/usr/bin/git" ]; then
echo "-> This script requires Git. Attempting to install."
if [ -e "/usr/bin/pacman" ]; then
sudo pacman -S git
@dzcpy
dzcpy / 超大字符集字体.md
Last active April 26, 2024 11:28
常用超大字符集字体

unicodecjkfonts

所谓“超大字符集字体”是指至少支持CJK-B的字体(约7万+字),常用的有如下几种:

中国大陆字形

  • 中易宋体(Windows 10 version 1809):部分支持CJK-E
13a81e63aae736ca2254492dd111d3ace4e9dbe9 *simsun.ttc
91a6e66e7c1139a27b6caa313dc451af36e4e5ed *simsunb.ttf
@CodyReichert
CodyReichert / react-es6-flow-emacs-configuration.md
Last active May 13, 2024 07:35
Configuring Emacs for react, es6, and flow

Configuring Emacs for react, es6, and flow

For a while, JSX and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.

This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.

Set up web-mode

web-mode provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.

@metaskills
metaskills / command.sh
Last active November 4, 2022 09:44
Ubuntu 16.04 Install Latest FreeTDS
$ sudo apt-get install wget
$ sudo apt-get install build-essential
$ sudo apt-get install libc6-dev
$ wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.27.tar.gz
$ tar -xzf freetds-1.00.27.tar.gz
$ cd freetds-1.00.27
$ ./configure --prefix=/usr/local --with-tdsver=7.3
$ make
$ make install
@oelmekki
oelmekki / doc.md
Created December 30, 2015 19:37
Rails + Browserify + React + es7

1. Gemfile

gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'

Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component (and thus, prerendering).

Note that jquery-rails can be removed from Gemfile, the npm version of jquery and jquery-ujs will be used instead.

@favadi
favadi / build-emacs.sh
Last active June 5, 2021 15:25
Compile latest emacs version (24.5) in Ubuntu 14.04
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Ubuntu 14.04 LTS
# version: 24.5
# Toolkit: lucid
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs
set -e
@aaronhalford
aaronhalford / chromeos-crosh-custom-setup.md
Created November 28, 2014 19:59
Customize ChromeOS Crosh Terminal with Custom Fonts and Solarized Dark Theme

Customize Chromebook Chrosh Shell Environment

Requirement: Chromebook, Common Sense, Commandline Ablity, 1 hour of time

Dear developers with a spare Chromebook lets inject a little personalization into your Crosh shell with custom fonts, the solarized theme, and extra secure shell options.

Also, keep in mind that the terms Chrosh, Chrosh Window, and Secure Shell all refer to various versions and extentions built around the ChromeOS terminal. Settings that affect the ChromeOS terminal are global.

Custom Fonts

@hopsoft
hopsoft / db.rake
Last active May 6, 2024 14:00
Rails rake tasks for dump & restore of PostgreSQL databases
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd
@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

; east asian ambiguous character table
(defun east-asian-ambiguous-characters ()
'(
(#x00A1 . #x00A1) (#x00A4 . #x00A4) (#x00A7 . #x00A8)
(#x00AA . #x00AA) (#x00AD . #x00AE) (#x00B0 . #x00B4)
(#x00B6 . #x00BA) (#x00BC . #x00BF) (#x00C6 . #x00C6)
(#x00D0 . #x00D0) (#x00D7 . #x00D8) (#x00DE . #x00E1)
(#x00E6 . #x00E6) (#x00E8 . #x00EA) (#x00EC . #x00ED)
(#x00F0 . #x00F0) (#x00F2 . #x00F3) (#x00F7 . #x00FA)
(#x00FC . #x00FC) (#x00FE . #x00FE) (#x0101 . #x0101)