Skip to content

Instantly share code, notes, and snippets.

@taiar
taiar / serbilian.rb
Created February 25, 2022 13:56 — forked from brunoro/serbilian.rb
Serbilian cyrilic: a cyrilic script for Brazilian Portuguese based in Serbian Cyrilic
#!/usr/bin/ruby
require 'logger'
require 'pragmatic_tokenizer'
require 'unicode_utils'
class Serbilian
SINGLE_LETTER_WORDS = {
"à" => "a",
"ã" => "ɐ̃",
"â" => "ɐ̃",
@taiar
taiar / readonly_user.sql
Created February 2, 2022 23:34
Create a read only user on psql
CREATE ROLE _readonly_user_name_ WITH LOGIN PASSWORD '_readonly_user_password_'
NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNTIL 'infinity';
GRANT CONNECT ON DATABASE _database_to_give_access_ TO _readonly_user_name_;
GRANT USAGE ON SCHEMA public TO _readonly_user_name_;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO _readonly_user_name_;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO _readonly_user_name_;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO _readonly_user_name_;
@deividsoncs
deividsoncs / webscrapPy
Last active January 21, 2023 12:37
web scrap desenvolvido em python utilizando o beautiful soup
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 24 16:52:20 2018
Realiza a captura das notícias do site do G1/ES e insere no banco de dados
MySQL
https://dcalixtoblog.wordpress.com
@author: calixto
"""
#importações
@aliostad
aliostad / stockfish-interface.txt
Created August 17, 2019 10:41
stockfish - Description of the universal chess interface (UCI)
COPIED FROM https://build.opensuse.org/package/view_file/games/stockfish/stockfish-interface.txt?expand=1
Description of the universal chess interface (UCI) April 2006
=================================================================
* The specification is independent of the operating system. For Windows,
the engine is a normal exe file, either a console or "real" windows application.
* all communication is done via standard input and output with text commands,
@zish
zish / vpnc-script
Last active June 13, 2022 18:47
OpenConnect vpnc-script for for MacOS High Sierra. Resolves problem with split DNS.
#!/bin/sh
#
# Originally part of vpnc source code:
# © 2005-2012 Maurice Massar, Jörg Mayer, Antonio Borneo et al.
# © 2009-2012 David Woodhouse <dwmw2@infradead.org>
#
# 2018-05-15 - Minor scutil updates for MacOS Split DNS added by Jeremy Melanson ( https://github.com/zish ).
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@simonewebdesign
simonewebdesign / install-quake3.sh
Last active November 14, 2023 19:25
Install Quake 3: Arena on a mac
#!/bin/bash
# Install Quake 3: Arena on a mac
# Copyright (c) 2016 simonewebdesign
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@taiar
taiar / .zshrc
Created July 22, 2016 14:45
ZSHRC
# Path to your oh-my-zsh installation.
export ZSH=/home/taiar/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="xxf"
# Uncomment the following line to use case-sensitive completion.
@taiar
taiar / dirw.php
Last active August 29, 2015 14:07
Dir watcher prototype
<?php
class dir_watcher {
private $dir;
private $files;
public function __construct($dir = '.') {
$this->dir = realpath($dir) . DIRECTORY_SEPARATOR;
$this->get_file_timestamps();
@taiar
taiar / gist:e605f28fdbabfeef0a7a
Created June 30, 2014 22:45
Setar teclado BR no OpenBOX
setxkbmap br
@taiar
taiar / Preferences.sublime-settings
Last active July 22, 2016 14:46
Preferences.sublime-settings
{
"color_scheme": "Packages/User/SublimeLinter/Solarized (Dark) (SL).tmTheme",
"ensure_newline_at_eof_on_save": true,
"font_size": 13,
"highlight_line": true,
"hot_exit": false,
"ignored_packages":
[
"Vintage"
],