Skip to content

Instantly share code, notes, and snippets.

Avatar
🗼

Camilo Sampedro camilosampedro

🗼
View GitHub Profile
View vscode_settings.json
{
"workbench.settings.useSplitJSON": true,
"window.zoomLevel": 1,
"editor.fontLigatures": true,
"editor.fontFamily": "Fira Code Regular, Liga Hack, Consolas, monospace",
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"name": "Comment",
"scope": [
View Import from csv to DynamoDB.js
// https://stackoverflow.com/a/33755463/4474204
// https://stackoverflow.com/a/33755463/4474204
var fs = require("fs");
var parse = require("csv-parse");
var async = require("async");
var AWS = require("aws-sdk");
var csv_filename = "data.csv";
rs = fs.createReadStream(csv_filename);
View .vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
let g:terraform_align=1
set number
highlight LineNr term=bold cterm=NONE ctermfg=129 ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
set numberwidth=1
set backspace=indent,eol,start
set clipboard=unnamed
"set paste
View .i3status.conf
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
View Read a CSV.scala
#!/bin/sh
exec scala "$0" "$@"
!#
/*
This script creates a SQL output with a format:
INSERT INTO table (columns, ...)
VALUES
(values, ...),
View agi-completo.php
#!/usr/bin/php -q
<?php
set_time_limit(30);
$param_error_log = '/tmp/notas.log';
$param_debug_on = 1;
require('phpagi.php');
require('yandex.php');
require("definiciones.inc");
$agi = new AGI();
View asterisk.php
#!/usr/bin/php -q
<?php
set_time_limit(30);
$param_error_log = '/tmp/notas.log';
$param_debug_on = 1;
require('phpagi.php');
require("definiciones.inc");
$agi = new AGI();
$agi->answer();
sleep(1);
View aliases.sh
{
echo "alias l.='ls -d .* --color=auto'"
echo "## get rid of command not found ##"
echo "alias cd..='cd ..'"
echo "## a quick way to get out of current directory ##"
echo "alias ..='cd ..'"
echo "alias ...='cd ../../../'"
echo "alias ....='cd ../../../../'"
echo "alias .....='cd ../../../../'"
@camilosampedro
camilosampedro / Install Aton prerequisites.sh
Last active Nov 7, 2016
Installs Java 8, Activator and MySQL on Ubuntu 16.04 LTS
View Install Aton prerequisites.sh
#!/bin/bash
# Variables
activator_version="1.3.12"
mysql_password="atonmysqldb"
# Install java
echo " => Installing Java 8"
echo " ==> Adding webupd8team/java repository"
sudo add-apt-repository ppa:webupd8team/java
echo " ==> Updating with the added repository"
@camilosampedro
camilosampedro / Daemon.sh
Last active Oct 22, 2016
Schema of how to create a script's daemon on /etc/init.d/
View Daemon.sh
#!/bin/bash
### BEGIN INIT INFO
# Provides: start-hadoop
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start Jupyter Notebook's service
# Description: Executes jupyter notebook in background.
### END INIT INFO
You can’t perform that action at this time.