Skip to content

Instantly share code, notes, and snippets.

View nedimf's full-sized avatar
🔥
building blazing.report - reimagine mobile analytics

Nedim nedimf

🔥
building blazing.report - reimagine mobile analytics
View GitHub Profile
@tkersey
tkersey / links.md
Last active May 4, 2024 18:55
For future reference but maybe not.
@tadija
tadija / FontNames-iOS-17.4.swift
Last active April 30, 2024 00:30
iOS - All Font Names
/*
*** Academy Engraved LET ***
AcademyEngravedLetPlain
---------------------
*** Al Nile ***
AlNile
AlNile-Bold
---------------------
*** American Typewriter ***
AmericanTypewriter
@asukakenji
asukakenji / 0-go-os-arch.md
Last active April 24, 2024 06:51
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@alok87
alok87 / sendmail.go
Created October 21, 2015 10:10
Sendmail Using Golang without SMTP- Example
package main
import (
"io/ioutil"
"os/exec"
"fmt"
)
// EXAMPLE: echo "Subject: TestnHello" | sendmail -f you@domain.com you@domain.com
// Useful Links: https://gobyexample.com/spawning-processes
@chatton
chatton / SendStringOverSocket.java
Last active April 16, 2024 08:10
Example of sending a String through a Socket in Java.
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
public class Client {
public static void main(String[] args) throws IOException {
// need host and port, we want to connect to the ServerSocket at port 7777
Socket socket = new Socket("localhost", 7777);
System.out.println("Connected!");
@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@fsodogandji
fsodogandji / socat-tips.sh
Last active April 11, 2024 18:47
socat tips & tricks
#To create a classic TCP listening daemon, similar to netcat -l, use a variation of the following command.
socat TCP-LISTEN:8080 stdout
#use remotly a command shell
socat TCP4-LISTEN:1234,reuseaddr,fork 'SYSTEM:/bin/cat /home/infos.txt'
#sslify a server
socat OPENSSL-LISTEN:443,reuse‐addr,pf=ip4,fork,cert=server.pem,cafile=client.crt TCP4-CONNECT:localhost:80
@jtbonhomme
jtbonhomme / nc.md
Last active April 2, 2024 10:57
Using Netcat for File Transfers

Netcat is like a swiss army knife for geeks. It can be used for just about anything involving TCP or UDP. One of its most practical uses is to transfer files. Non *nix people usually don't have SSH setup, and it is much faster to transfer stuff with netcat then setup SSH. netcat is just a single executable, and works across all platforms (Windows,Mac OS X, Linux).

Destination

On the receiving (destination) terminal, run:

nc -l -p 1234 > out.file