Skip to content

Instantly share code, notes, and snippets.

View kuntau's full-sized avatar
💭
I may be slow to respond.

Nizamuddin Sulieman kuntau

💭
I may be slow to respond.
View GitHub Profile
@kuntau
kuntau / url-segment.js
Created September 15, 2020 23:13
Get last URL segment
// PENDING TESTING..
// Get pathname
var pathName = window.location.pathname;
getLastSegment = function(pathName) {
// declare local
var lastSegment = -1; //false by default
// Check if we even have a pathname
@kuntau
kuntau / tmux.sh
Created June 1, 2020 07:34
TMUX default key bindings
bind-key -T copy-mode C-Space send-keys -X begin-selection
bind-key -T copy-mode C-a send-keys -X start-of-line
bind-key -T copy-mode C-b send-keys -X cursor-left
bind-key -T copy-mode C-c send-keys -X cancel
bind-key -T copy-mode C-e send-keys -X end-of-line
bind-key -T copy-mode C-f send-keys -X cursor-right
bind-key -T copy-mode C-g send-keys -X clear-selection
bind-key -T copy-mode C-k send-keys -X copy-end-of-line
bind-key -T copy-mode C-n send-keys -X cursor-down
bind-key -T copy-mode C-p send-keys -X cursor-up
@kuntau
kuntau / index.html
Last active April 14, 2020 11:16
Vue horizontal scroller -- https://codepen.io/kuntau/full/XWmJezP
<div id="card" class="card-header bg-gray-200 border rounded shadow-md relative flex">
<button id="left" @click="left" class="p-4 hover:bg-gray-300 border"><i class="fas fa-chevron-left"></i></button>
<div id="wrapper" ref="wrapper" class="wrapper whitespace-no-wrap flex-auto flex overflow-x-hidden w-full">
<a class="inner px-4 py-4 border-r text-gray-700 bg-gray-300 shadow-inner" href="#"><i class="fas fa-star"></i> Favorite</a>
<a class="inner px-4 py-4 hover:bg-gray-300 border-r" href="#"><i class="fas fa-utensils"></i> Foods</a>
<a class="inner px-4 py-4 hover:bg-gray-300 border-r" href="#"><i class="fas fa-beer"></i> Cold drinks</a>
<a class="inner px-4 py-4 hover:bg-gray-300 border-r" href="#"><i class="fas fa-coffee"></i> Hot drinks</a>
<a class="inner px-4 py-4 hover:bg-gray-300 border-r" href="#"><i class="fas fa-search"></i> Search</a>
<a class="inner px-4 py-4 hover:bg-gray-300 border-r" href="#"><i class="fas fa-utensils"></i> F{{ position }}</a>
<a class="inner px-
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@kuntau
kuntau / ascii.md
Created October 14, 2016 22:16
ASCII arts
╭━━━━╮               This is cooldog. Help
╰┃ ┣▇━▇                cooldog take over 
 ┃ ┃  ╰━▅╮ Discord by pasting
 ╰┳╯ ╰━━┳╯        him in 10 other
  ╰╮ ┳━━╯            servers or you
 ▕▔▋ ╰╮╭━╮   will never be a cool dog.
╱▔╲▋╰━┻┻╮╲╱▔▔▔╲
▏  ▔▔▔▔▔▔▔  O O┃ 
╲╱▔╲▂▂▂▂╱▔╲▂▂▂╱
@kuntau
kuntau / discord.js
Last active April 6, 2017 09:25
Hide Discordapp channel sidebar
//ref: http://andrewhfarmer.com/hide-discord-sidebar/
document.addEventListener('keydown', function(event) {
if (event.metaKey && event.keyCode === 220) {
// Toggle visibility of the channel and guilds columns
var channelWrap = $('.flex-vertical.channels-wrap');
var guildsWrap = $('.guilds-wrapper');
var titleWrap = $('.title-wrap');
if (channelWrap.getAttribute('style') === 'display: none') {
channelWrap.setAttribute('style', '');
guildsWrap.setAttribute('style', '');
@kuntau
kuntau / TrainStation.ahk
Created November 9, 2016 13:37
TS AutoClick v2.0
#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Client
SendMode Input
#SingleInstance Force
SetTitleMatchMode 2
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
@kuntau
kuntau / popout.js
Last active October 27, 2016 06:23
Browser Popup
angular.module("trackerApp").directive("stream", ["$sce", "$rootScope", function(a, b) {
return {
restrict: "E",
templateUrl: "views/match_stream.html",
scope: !1,
transclude: !1,
controller: ["$scope", function(c) {
c.trustTwitchSrc = function(b) {
return a.trustAsResourceUrl("http://twitch.tv/" + b + "/embed")
}
@kuntau
kuntau / pokeradar_fixed.js
Last active September 8, 2016 08:48
A fix and cleanup for pokeradar.io
// ==UserScript==
// @name PokeRadar.io fixed
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.pokeradar.io/
// @grant GM_addStyle
// @grant GM_log
// @grant unsafeWindow
@kuntau
kuntau / GAME_MASTER_v0_1.protobuf
Created August 15, 2016 17:32 — forked from anonymous/GAME_MASTER_v0_1.protobuf
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {