Skip to content

Instantly share code, notes, and snippets.

Augusts Bautra Epigene

Block or report user

Report or block Epigene

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:10735300
bc -l
View gist:cda2a7b148012e0e06d6
# encoding: Windows-1252
require "unicode_utils/downcase"
sentence_length = 20 # Change this to suit how short a sentence is useless.
saturs ='te.csv').gsub(/([\t\r\n\v\f]+)/){ |m| " " } # IO read in text, removes newlines
saturs.gsub!(/([^ a-zA-Z\u00C0-\u017F\!\?\.]+)/){ |m| " " }
saturs.gsub! /(?<=[a-zA-Z\u00C0-\u017F])[ ]+[A-Z\p{Lu}]+[a-z\p{Ll}]*(?=[ ])/, '' # izņem Īpašvārdus teikuma vidū.
Epigene / fish.setup
Created Jul 1, 2014
How to setup fish shell on a Mac
View fish.setup
0. set up sublime terminus:
$ echo "export PATH=~/bin:$PATH" >> ~/.profile
$ ln -s "/Applications/Sublime Text" ~/bin/subl
(use with $ subl)
1. $ brew install fish
2. $ curl -L | fish
3. add contents to ~/.config/fish/
4. $ sudo nano /etc/shells # and add "/usr/local/bin/fish" bin path for fish
5. set to default:
$ grep -q '^/usr/local/bin/fish$' /etc/shells; or echo '/usr/local/bin/fish' | sudo tee -a /etc/shells
View gist:903a7237b9d36388c867
#!/usr/bin/env ruby
# Usage: paste in a file and call it in console with `ruby filename`
# inicializē datu struktūras
musejie = []
`rm out.csv` ; `touch out.csv`
#ielasa no faila pasaucot shell command
musejie = `cat musejie.csv`.split.uniq # musejie.csv satur ierakstus katru jaunā rindiņā caur kuriem laist ciklu
View gist:882af8dbc3e2033dcbcc
tell application "Google Chrome"
open location ""
end tell
tell application "Terminal"
do script "cd ~/Desktop" in front window
set position of window 1 to {1320, 22}
set size of first window to {600, 450}
View Preferences.sublime-settings
"auto_complete": false,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/Antigua.tmTheme",
"default_line_ending": "unix",
"detect_indentation": false,
"detect_slow_plugins": false,
"fallback_encoding": "UTF-8",
"find_selected_text": true,
Epigene / merge_conflick_ours
Created Jul 29, 2014
Kā mergot ņemot lokālo versiju kā dominējošo konfliktu gadījumā
View merge_conflick_ours
git fetch
git merge
git checkout --ours . # checkout our local version of all files
git add -u # mark all conflicted files as merged
git commit -am "Successful merge" # commit the merge
View gist:394b02a22b5433694080
user www-data;
worker_processes 4;
pid /run/;
events {
worker_connections 10000;
# multi_accept on;
http {
Epigene / Droplet_from_Image
Last active Aug 29, 2015
Droplet from Creative Image
View Droplet_from_Image
# Postgres database
# Check online for the newst version number
sudo apt-get -y install postgresql-common postgresql-9.3
sudo -u postgres psql
# create database <app> owner creative;
# Configure GIT
git config --global "<YourGitName>"
View Droplet_Image_Setup
## Here is what image already has
#add repos
add-apt-repository ppa:nginx/stable
add-apt-repository ppa:chris-lea/node.js
sudo sh -c "echo 'deb precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - | sudo apt-key add -
You can’t perform that action at this time.