Skip to content

Instantly share code, notes, and snippets.

View sebastian-palma's full-sized avatar

Seb sebastian-palma

View GitHub Profile
Read input until newline and translate into a number
, ----- ----- [ +++++ +++++
> [ - > +++++ +++++ < ]
+++++ +++ [ - < ----- - > ]
< [ - >> + << ]
>> [ - < + > ]
<< , ----- ----- ]
Start loop and run the algorithm on each number between zero and the input number
>> - < [ > +
@7rin0
7rin0 / gist:ea890d2d4bf25a890b86aff01290e7d0
Created March 3, 2017 01:52
Docker exec root or default user
# Root.
$ docker exec -u 0 i -t {container_id/image_name} bash
or
# Default container's user.
$ docker exec i -t {container_id/image_name} bash
@tristandostaler
tristandostaler / InstallSelenium.sh
Created July 7, 2016 16:27
How to install correctly python Selenium (tested on ubuntu gnome)
apt-get install ipython
apt-get install python-pip
pip install selenium
mkdir /root/bin
cd /root/bin
wget https://github.com/mozilla/geckodriver/releases/download/v0.9.0/geckodriver-v0.9.0-linux64.tar.gz
tar -xvzf geckodriver-v0.9.0-linux64.tar.gz
rm geckodriver-v0.9.0-linux64.tar.gz
chmod +x geckodriver
cp geckodriver wires
@border
border / Makefile
Created January 12, 2011 01:36
json example in golang
include $(GOROOT)/src/Make.inc
GOFMT=gofmt -spaces=true -tabindent=false -tabwidth=4
all:
$(GC) jsontest.go
$(LD) -o jsontest.out jsontest.$O
format:
$(GOFMT) -w jsontest.go
@cooperka
cooperka / ListView to FlatList.diff
Last active June 18, 2020 05:36
Migrating from ListView to FlatList in React Native.
-import { Text, View, ListView } from 'react-native';
+import { Text, View, FlatList } from 'react-native';
import style from './styles';
import listData from './listData';
class App extends Component {
- constructor(props) {
- super(props);
require 'json'
COLORS = {
'#' => '#216e39',
'+' => '#30a14e',
':' => '#40c463',
'-' => '#9be9a8',
'.' => '#ebedf0',
' ' => nil,
}
@s0kil
s0kil / purple-yolk-vscode.md
Last active February 24, 2021 15:09
Setting Up VS Code purple-yolk Extension With IHP

Integrating purple-yolk With IHP

  • In your IHP project directory, create a file named .ghci-purple-yolk and copy the contents of the .ghci file
  • Add :l Main.hs to the end of the .ghci-purple-yolk file

.ghci-purple-yolk should look something like:

:set -XNoImplicitPrelude
:def source readFile
@kevinelliott
kevinelliott / osx-10.11-setup.md
Last active April 10, 2022 15:47
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

@yocontra
yocontra / aoe2hd.md
Last active June 9, 2023 18:28
Age of Empires II HD - For Mac OSX
@Integralist
Integralist / Ruby Lambdas.md
Last active August 8, 2023 05:10
Ruby lambdas

Lambda: standard

# Creating a lambda
l = lambda { |name| "Hi #{name}!" }

# Executing the lambda
l.call("foo") # => Hi foo!