Skip to content

Instantly share code, notes, and snippets.

View neoreids's full-sized avatar
🏠
Working from home

Muhammad Nur Wahid neoreids

🏠
Working from home
View GitHub Profile
@neoreids
neoreids / actionlist.vim
Created July 6, 2024 18:51 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@neoreids
neoreids / postgres_array.go
Created February 16, 2023 15:47 — forked from mikeatlas/postgres_array.go
PostgreSQL demo of Array types using Golang
package main
import (
"database/sql"
"errors"
"fmt"
_ "github.com/bmizerany/pq"
"os"
"regexp"
"strings"
@neoreids
neoreids / notes.md
Created January 2, 2023 09:18
resolving pycurl, psycopg2-binary with clang problem

error: command '/usr/bin/clang' failed with exit code 1

brew install openssl

brew --prefix openssl

export LDFLAGS="-L<result_of_prefix_brew_command_openssl>"

export CPPFLAGS="-I<result_of_prefix_brew_command_openssl>"

REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@neoreids
neoreids / AppServiceProvider.php
Created March 15, 2022 15:41 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@neoreids
neoreids / part.md
Created August 10, 2021 04:05 — forked from oisobstudio/part.md
Django Pagination Server-Side Menggunakan DataTable

myapp/views.py

import json

from django.views.generic import View
from django.http import HttpResponse
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.db.models import Q
from django.core.serializers.json import DjangoJSONEncoder
@neoreids
neoreids / main.go
Last active July 11, 2021 07:45
gin golang upload stream to s3
package main
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
"github.com/gin-gonic/gin"
"net/http"
)
@neoreids
neoreids / install-docker.md
Created July 8, 2021 06:46 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@neoreids
neoreids / call_method_with_reflection.go
Created April 27, 2021 13:11 — forked from tkrajina/call_method_with_reflection.go
Golang, call method (and fill arguments) with reflection
package main
import (
"fmt"
"reflect"
)
type Aaa struct {
a string
}
@neoreids
neoreids / Program.cs
Created March 30, 2021 04:56 — forked from lmcarreiro/Program.cs
Get list of Access Point (BSSID and Signal) using C#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;