Skip to content

Instantly share code, notes, and snippets.

View thesabbir's full-sized avatar

Sabbir Ahmed thesabbir

View GitHub Profile
@endolith
endolith / Has weird right-to-left characters.txt
Last active July 17, 2024 12:41
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@tzermias
tzermias / ip_forward.md
Last active May 5, 2024 17:03
Forward traffic from wlan0 to eth0 interface

Forward traffic from a laptop's eth0 to wlan0

###To laptop

Specify an IP address to eth0 (here 192.168.56.1)

sudo ifconfig eth0 192.168.56.1 netmask 255.255.255.0
@treyrich
treyrich / Example.js
Last active May 30, 2017 20:36
This is an AngularJS provider to communicate with a Sails.js backend via Socket.IO.After searching for way too long for a way to interface with the Sails.js client-side SDK included in new Sails projects via AngularJS I decided to write a drop in replacement for the AngularJS $http provider.Although this isn't a full replacement it includes a nu…
angular.module("MyApp", ["SocketProvider"])
.controller("MyController", ["$scope", "socket", function($scope, socket) {
// Fetch initial data
$scope.person = null;
socket.get("/person/1").success(function(data) {
$scope.person = data;
}).error(function() {
@CrashenX
CrashenX / vm-bridge
Last active July 25, 2016 18:05
Example script for configuring host networking for KVM guest. Works for wireless interface on host.
#!/bin/bash
# "Bridge" Networking between KVM Guest and Host
#
# Copyright (c) 2014 Jesse J. Cook
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@thesabbir
thesabbir / ovpn2nm.js
Last active August 29, 2015 14:03
Openvpn config to network manager config converter. Download and make this script executable and run (you need to have node.js installed).
#!/usr/bin/env node
var args = process.argv.slice(2);
if (args[0] == '-h' || args[0] == undefined) {
console.log('\nUsage : ovpn2nm.js [file]');
console.log('Example : ovpn2nm.js client.ovpn');
console.log('\nVersion 0.0.1');
return 0;
};
@thesabbir
thesabbir / GithubBengaliFontFix.user.js
Last active August 29, 2015 14:04
Tampermonkey userscript for fixing broken bengali font rendering on github sites.
// ==UserScript==
// @name Github Bengali Font Fix
// @namespace thesabbir.github.fontfix
// @version 0.3
// @description Tampermonkey userscript for fixing broken bengali font rendering on github sites.
// @match https://github.com/*
// @match https://*.github.com/*
// @copyright 2014 Sabbir Ahmed
// ==/UserScript==
@zentrope
zentrope / index.html
Last active July 18, 2016 17:33
HelloWorld Cordova ClojureScript
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<!-- WARNING: for iOS 7, remove the width=device-width and
height=device-height attributes. See
https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport"
@sarciszewski
sarciszewski / README.md
Created May 30, 2015 04:25
A Crusade Against Bad Code

Aniruddh Agarwal blogged A short tour of PHP, and this is one of the negatives he identified:

Community: I know. I said that PHPs community was an advantage to it, but it is also a disadvantage, because of BAD CODE. Beginners are not taught the best practices and they go on to write bad code and distribute it, either as answers on Stack Overflow or similar websites or blog about it, which encourages other beginners to adopt those practices. There is a lot of misinformation out there, and it is very difficult to separate the good from the bad. This is perhaps the worst thing about PHP, because PHP is an entry-level language and people learning it are usually not aware of the best practices.

This is spot on!

The existence of BAD CODE being copied and pasted by newcomers is probably the biggest source of exploitable security vulnerabilities in the entire industry.

The biggest offenders are often the highest ranking search results on Google and other search eng

@85degree
85degree / updateip.lua
Created February 13, 2016 21:18
CloudFlare Dynamic DNS using OpenWRT
#!/usr/bin/lua
-- Original script: https://github.com/nileshgr/utilities/blob/master/general/updateip.lua
-- http://nileshgr.com/2015/09/23/cloudflare-dynamic-dns-using-openwrt
-- For use with openwrt since openwrt supports LUA.
-- Prerequisites:
-- luasec
-- luasocket
-- libubus-lua