Skip to content

Instantly share code, notes, and snippets.

@edersohe
edersohe / cpl.txt
Last active February 1, 2021 08:16
# curl -L archfi.sf.net > archfi
# sh archfi -cpl https://git.io/JtRZN
# Base
base-devel
linux-headers
linux-firmware
pacman-contrib
xf86-video-vesa
xorg-server
@edersohe
edersohe / arch-linux-install-notes.txt
Last active March 28, 2024 20:48
Install arch linux connect to WPA wireless from Arch Linux iso
loadkeys es
curl -o notes -L https://git.io/Jt8bu
#1) Get wifi devices
iwconfig
#2) Scannig available wifi networks with specific device, in my case wlan0
iwlist wlan0 scan | grep ESSID
#!/usr/bin/env sh
#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%&?+*-_=:;.<>!?
#USER=id,name,department,folio,username,password,expiration
USERS='1000,User Demo 1,Department 1,#202020,user1,ekSRl1D3?8$:,2022-09-09\n1002,User Demo 2,Department 2,#32432,user2,ev5*&#A$@kLs,2021-02-19\n'
create_users () {
while IFS=',' read -r id name area folio username password expiration
@edersohe
edersohe / init.toml
Last active March 22, 2022 13:03
Spacevim configuration plugins elixir, lsp, colorcheme, git, versioncontrol, denite, defx
# All SpaceVim option below [option] section
[options]
# set spacevim theme. by default colorscheme layer is not loaded,
# if you want to use more colorscheme, please load the colorscheme
# layer
colorscheme = "onedark"
colorscheme_bg = "dark"
# Disable guicolors in basic mode, many terminal do not support 24bit
# true colors
enable_guicolors = true
@edersohe
edersohe / map_to_text.ex
Last active February 8, 2020 15:43
Ecto field convert a map to text and text to map [elixir :map -> postgres :text -> elixir :map]
# Into ecto migration "add :my_field, :text"
# Into ecto schema "field :my_field, MapToText"
defmodule MapToText do
use Ecto.Type
def type, do: :map
def cast(data) when is_map(data), do: {:ok, data}
def cast(_), do: :error
@edersohe
edersohe / example.html
Created December 31, 2010 09:19
short plugin that implement vertical buttonset for radio buttons and checkboxes with jquery ui
<html>
<head>
<title>Test</title>
<link rel="stylesheet" media="all" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/start/jquery-ui.css"></link>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script>
<script src="jquery.myplugin.js"></script>
<script>
$(document).ready(function(){
//call plugin