Skip to content

Instantly share code, notes, and snippets.

View nuke99's full-sized avatar
🎯
Focusing

Treasure Jayasinghe nuke99

🎯
Focusing
View GitHub Profile
@nuke99
nuke99 / dev
Last active April 16, 2021 08:51
Temper Docker Support
#!/usr/bin/env bash
if [ $# -eq 0 ] ; then
echo "avaiable commands"
echo "- artisan"
echo "- composer"
echo "- shell"
echo "- yarn"
exit 1
@nuke99
nuke99 / webpack.mix.js
Created January 15, 2019 17:51
Add alias to webpack
mix.webpackConfig({
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': __dirname + '/resources/js'
},
},
});
@nuke99
nuke99 / gist:fab6cb796c63b3a4bf547eb658f3537a
Last active January 15, 2019 15:27
Developer Shortcuts
iTerm
-------
New Tab ⌘ + T
Previous Tab ⌘ + ←
Next Tab ⌘ + →
Close tab ⌘ + w
@nuke99
nuke99 / phpmyadmin.sh
Created February 9, 2018 06:00
Simple Bashscript to start phpmyadmin in node environment
IP=$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
echo $IP
cd /usr/share/phpmyadmin && php -S $IP:3400
#include <iostream>
#include "md5.h"
using namespace std;
MD5 md5;
void md5conv (char val){
cout << "md5 hash of the value " << val << " is " << md5.digestString(val) ;
}
int main()
#!/usr/bin/ruby
require 'net/http'
def req_get(url)
uri = URI(url)
#puts uri
Net::HTTP.start(uri.host, uri.port) do |http|
request = Net::HTTP::Get.new uri.request_uri
response = http.request request # Net::HTTPResponse object
# puts response.body
#!/usr/bin/ruby
require 'optparse'
OptionParser.new do |op|
op.on('-h') {|h| $host = h}
op.on('-i') {|h| $inj = h}
op.on('-h') { puts o; exit }
end
if $host and $inj
require 'webrick'
require 'webrick/httpproxy'
require 'pp'
s = WEBrick::HTTPProxyServer.new(:Port => 8080,
:RequestCallback => Proc.new{|req,res|
#puts req.request_line
#puts "+--------------------------------------+"
pp req.raw_header
})
require 'tk'
class Actions
def self.input(fname,sname)
return "Your Name is #{fname} #{sname}"
end
end
panel = TkRoot.new{title "First Ruby App"}
#!/usr/bin/ruby
require 'lib/command_execution'
require 'lib/zcode_mods'
class Core
#include Super
@@prompt = nil
@@active_module = nil
@@target = nil
#Core Command Gather