Skip to content

Instantly share code, notes, and snippets.

View obasekiosa's full-sized avatar

Osakpolor Obaseki obasekiosa

  • Lagos, Nigeria
View GitHub Profile
@obasekiosa
obasekiosa / ANSI.md
Created November 24, 2023 16:57 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@obasekiosa
obasekiosa / weird_encode_decode.go
Created July 11, 2023 20:35
Decode json to byte field (base64 encoded string) and re-encode gives a result different from the start json
package main
import (
"encoding/json"
"fmt"
"bytes"
)
type Obj struct {
import java.util.*;
import java.io.*;
class Solution {
class Node {
Node left;
Node right;
int data;
@obasekiosa
obasekiosa / Result.java
Created March 16, 2022 20:21
Solution to the Equal stack challenge on Hacker Rank (https://www.hackerrank.com/challenges/equal-stacks/problem)
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
import static java.util.stream.Collectors.joining;
@obasekiosa
obasekiosa / test.html
Created February 25, 2022 15:24
For your eyes only
<!DOCTYPE html> <!-- this tells us the html version -->
<html>
<head>
<link rel="stylesheets" type="text/css" href="styles.css">
<title>Test html</title>
</head>
<body>
@obasekiosa
obasekiosa / ordered substring
Created June 25, 2015 16:53
hello...can someone please tell me how to fix the bug in this code, I tried all i could but...am here..
kip = []
s = raw_input('give me a string: ')
v = s[len(s) - 1]
for a in range(len(s)):
store = s[a]
for i in range(len(s)):
z = v == s[len(s) - 1]
if z == True:
c = (i + 1 >= len(s))
if c == False: