Skip to content

Instantly share code, notes, and snippets.

View kveber's full-sized avatar

Klaus Veber kveber

View GitHub Profile
@kveber
kveber / FTP-UploadDirectory.ps1
Last active January 7, 2019 05:07 — forked from dkittell/FTP-UploadDirectory.ps1
PowerShell – FTP Upload Directory With Sub-Directories
clear
# FTP Server Variables
$FTPHost = 'ftp://192.168.1.1/html/'
$FTPUser = 'user'
$FTPPass = 'password'
#Directory where to find pictures to upload
$UploadFolder = "C:\Temp\"
@kveber
kveber / AESCryptoSample.cs
Last active January 18, 2019 11:48
AES/Rijndael Cryptography Simple Sample
using System;
using System.IO;
using System.Text;
using System.Security.Cryptography;
public class Program
{
public static void Main()
{
string key = "1234567812345678";
@kveber
kveber / brazil-geographic-coverage.geojson
Created May 14, 2019 18:12 — forked from rogerluan/brazil-geographic-coverage.geojson
Cobertura geográfica do Brasil em formato GeoJSON, nos moldes da Apple, para submissão no iTunes Connect.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kveber
kveber / .bash_profile
Last active July 12, 2019 13:45 — forked from lopespm/.bash_profile
mac terminal bash improvements
# ---------------------------------------------------------------------------
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
# 6. Networking
# 7. System Operations & Information
@kveber
kveber / Ionic Android Development on WSL.md
Last active March 27, 2020 17:07 — forked from fedme/Ionic Android Development on WSL.md
Ionic Android Development on WSL (Windows Subsystem for Linux)

Ionic Android Development on WSL

Installing the required software

Execute the following commands to install Node, npm, git, Java, Ionic, Cordova and Angular CLI:

cd ~
sudo apt update
sudo apt upgrade
@kveber
kveber / lua-resty-redis
Last active October 5, 2022 18:28
Example - lua-resty-redis
# SOURCE: https://nginx-lua.readthedocs.io/en/latest/examples/lua-resty-redis/
# you do not need the following line if you are using
# the OpenResty bundle:
lua_package_path "/path/to/lua-resty-redis/lib/?.lua;;";
server {
location /test {
content_by_lua_block {
local redis = require "resty.redis"
local red = redis:new()
@kveber
kveber / Rebuild.All.Indexes.n1ql
Created October 18, 2022 01:16
Rebuild All Couchbase N1QL Indexes After Restore
-- Note: Extra () around subquery is needed make it expression. i.e one () for BUILD index syntax and other() for subquery.
BUILD INDEX ON default((SELECT RAW name FROM system:indexes WHERE keyspace_id = 'default' AND state = 'deferred'));
-- Wait few secs finish build index and see if build is complete.
SELECT RAW name FROM system:indexes WHERE keyspace_id = 'default' AND state = 'deferred' ;
@kveber
kveber / gist:409b346b0dead02263c6bd05548a0ab9
Created September 9, 2023 21:58
api to automatize authorised networks via gcloud command
const got = require('got')
const token = process.env.ACCESS_TOKEN
const headers = { Authorization: `Bearer ${token}`}
if (!token) {
console.error(`Missing env $ACCESS_TOKEN value is ${token}`)
return (1)
}