Skip to content

Instantly share code, notes, and snippets.

View unixc3t's full-sized avatar
😂
coding

rudy unixc3t

😂
coding
View GitHub Profile
@unixc3t
unixc3t / gist:e8f5ea229dd41a2834375a59b844fd16
Created November 30, 2024 08:28
resolve xmind can't run in linux os
1 add jar to ../XMind_Linux_64bit/
2 "Unable to acquire application service"
modify xmind.ini
-startup
/home/rudy/pro/xmind/Commons/plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
/home/rudy/pro/xmind/Commons/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807
-configuration
/etc/locale.conf
LANG=en_US.UTF-8
1 sudo pacman-mirrors -c China -i -m rank
select ustc
2 sudo pacman -Syy && sudo pacman -Syu
3 sudo pacman -S vim
sudo vim /etc/pacman.conf # 打开文件
@unixc3t
unixc3t / uninstall_zsh.sh
Created November 24, 2024 03:09 — forked from brei0x/uninstall_zsh.sh
Uninstall Zsh + Oh My Zsh + Powerlevel10k theme (macOS & Linux)
#!/bin/sh
# Uninstall Zsh + Oh My Zsh + Powerlevel10k theme (macOS & Linux)
# run: sh -c "$(curl -fsSL "$(echo "$(curl -s "https://api.github.com/gists/254e58bd87009963b3f58405d75cbe6c")" | grep -o '"raw_url": *"[^"]*"' | cut -d'"' -f4)")"
# Remove installations + configurations
rm -f ~/.p10k.zsh
rm -rf -- ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sh ~/.oh-my-zsh/tools/uninstall.sh -y
sudo chsh -s $(which bash)
@unixc3t
unixc3t / gist:fb19ee2aef64f6667acc1915fcd01ea5
Last active January 7, 2025 08:20
phoenix component and sloct_demo
use Phoenix.Component
import Phoenix.HTML
attr :myrows, :list, required: true
slot :mycol, required: true do
attr :label, :string
end
def table_1(assigns) do
@unixc3t
unixc3t / RAILS_CHEATSHEET.md
Created September 7, 2023 13:08 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@unixc3t
unixc3t / the % notation in ruby.md
Created July 17, 2023 13:39 — forked from jakimowicz/the % notation in ruby.md
%Q, %q, %W, %w, %x, %r, %s, %I, %i

%Q, %q, %W, %w, %x, %r, %s, %i

Perl-inspired notation to quote strings: by using % (percent character) and specifying a delimiting character.

Any single non-alpha-numeric character can be used as the delimiter, %[including these], %?or these?, %~or even these things~.

Strings

% or %Q

VSCode italic font settings

Add this to settings.json (cmd ,):

{
  "editor.fontFamily": "Operator Mono, Fira Code iScript, Menlo, Monaco, 'Courier New', monospace",
  "editor.fontLigatures": true,
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
@unixc3t
unixc3t / List.vue
Created December 16, 2019 03:00 — forked from Akryum/List.vue
Vue - onScrollBottom composable function
<script>
import { ref } from '@vue/composition-api'
import { onScrollBottom } from '@/scroll'
export default {
setup () {
function loadMore () {
// ...
}
@unixc3t
unixc3t / gist:1cbb7abcfbe51ec109ea9633c86b3e99
Created August 3, 2019 07:23 — forked from Shemeikka/gist:11f196884212dc650e828c2f71c4bddf
Elixir Genserver callbacks and return values
# GenServer callbacks and return values
## init(args)
{:ok, state}
{:ok, state, timeout}
:ignore
{:stop, reason}
## handle_call(msg, {from, ref}, state)
@unixc3t
unixc3t / phx-1.4-upgrade.md
Created July 29, 2019 03:19 — forked from chrismccord/phx-1.4-upgrade.md
Phoenix 1.3.x to 1.4.0 Upgrade Guides

Phoenix 1.4 ships with exciting new features, most notably with HTTP2 support, improved development experience with faster compile times, new error pages, and local SSL certificate generation. Additionally, our channel layer internals receiveced an overhaul, provided better structure and extensibility. We also shipped a new and improved Presence javascript API, as well as Elixir formatter integration for our routing and test DSLs.

This release requires few user-facing changes and should be a fast upgrade for those on Phoenix 1.3.x.

Install the new phx.new project generator

The mix phx.new archive can now be installed via hex, for a simpler, versioned installation experience.

To grab the new archive, simply run: