A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.
posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord
# Use systemd for managing NVIDIA driver suspend in drivers ====>>> PRIOR to version 470 <<<===== | |
# https://download.nvidia.com/XFree86/Linux-x86_64/450.66/README/powermanagement.html | |
# https://forums.developer.nvidia.com/t/unable-to-set-nvidia-kernel-module-parameters/161306 | |
# Please note: In Fedora Linux you may need to just install the xorg-x11-drv-nvidia-power pakage | |
# as sugested by @goombah88 in the comments below. | |
TMP_PATH=/var/tmp | |
TMPL_PATH=/usr/share/doc/nvidia-driver-460/ | |
echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=${TMP_PATH}" | sudo tee /etc/modprobe.d/nvidia-power-management.conf |
require 'unf' | |
require "sqlite3" | |
class AddressSplitter | |
# コンストラクタ | |
def initialize | |
# DBを読み込む | |
@db = SQLite3::Database.new 'zenkoku.sqlite3' | |
# その他初期化 | |
@pref_list = [] |
#!/bin/sh | |
# | |
# Orinally made by Lovell Fuller for sharp | |
# https://github.com/lovell/sharp | |
# | |
# Usage: | |
# curl -s https://gist.githubusercontent.com/h2non/89bb2f87c6499d0b25f1/raw/bf3d0743107f02f5db2b93c53f7f0e07a1c33112/libvips-installer.sh | sudo bash - | |
# |
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:state_enabled="false" | |
android:color="@color/flat_disabled_text"/> | |
<item android:color="@color/flat_normal_text"/> | |
</selector> |
<?php | |
/** | |
* | |
* This is a quick way to turn a simple text file | |
* with a list of urls in a text file (sitemap-urls.txt) | |
* into a valid XML Sitemap: | |
* http://en.wikipedia.org/wiki/Sitemaps | |
* Put this file sitemap.xml.php and sitemap-urls.txt at | |
* the webroot http://example.com/sitemap.xml.php |