Skip to content

Instantly share code, notes, and snippets.

View x0x8x's full-sized avatar
🏠
Working from home

x0x8x x0x8x

🏠
Working from home
View GitHub Profile
#!/bin/bash
# First verify the version of Java being used is not Oracle JDK.
java -version
# Get the latest Oracle Java SDK http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
wget -c --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u31-b13/jdk-8u31-linux-x64.rpm" --output-document="jdk-8u31-linux-x64.rpm"
# Install Java SDK
sudo rpm -i jdk-8u31-linux-x64.rpm
@x0x8x
x0x8x / gist:6127738a049ecd4e34ba
Last active August 31, 2015 09:27 — forked from jgrossiord/gist:0bd525974a5ec059adba
Mikrotik script generate address list from DNS cache entries
:foreach i in=[/ip dns cache find] do={
:local bNew "true";
:local cacheName [/ip dns cache all get $i name] ;
# :put $cacheName;
:if (([:find $cacheName "facebook" -1] >= 0) || ([:find $cacheName "outlook" -1] >= 0)) do={
:local tmpAddress [/ip dns cache get $i address] ;
:put $cacheName;
:put $tmpAddress;
GET /dl/Mac HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Encoding: gzip, deflate
Host: download-chromium.appspot.com
Connection: Keep-Alive
Cookie:
@x0x8x
x0x8x / gist:072ff076b4f6c448203f824332ae6fe8
Created May 25, 2016 01:31 — forked from sgergely/gist:3793166
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
@x0x8x
x0x8x / 0_reuse_code.js
Created June 29, 2016 16:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
16.04 xenial stretch / sid
15.10 wily jessie / sid
15.04 vivid jessie / sid
14.10 utopic jessie / sid
14.04 trusty jessie / sid
13.10 saucy wheezy / sid
13.04 raring wheezy / sid
12.10 quantal wheezy / sid
12.04 precise wheezy / sid
11.10 oneiric wheezy / sid
@x0x8x
x0x8x / base64decode.pl
Last active June 30, 2016 08:27
decode encrypted base64 ADGuard License
use MIME::Base64;
$encoded = '2SsKI4rG9M6bqkQ4bM8DaPmSJ/2+JQN9GEwZrz3JUTC/bq0Vp+S9sh/ftBEzLBdJEGpnGM3EWNWSgg9tKY58/ieE7aQyrIqXXcTl9bvjHTzf67n+GVMLEpRW+DBs6LB0YqdIW2FE0mTMndXfOuSMap804yv029FokDvyGanpvbqawnrj9eowepHix3rmlf/UGYvwFN3NyUd7gmUkRsgPqTw7mgoLk49D+AYmXE/SU8qsSfR8jgkQux7EPGTrh//282w+ruLrqTcDJCBEI9CMX6EiV3DWznM/MtpoiR224b96GkGWOm99q4HhvrOvDyIWGmRHqmYC2SwRB/MGuuQfk+6oj7ogOyvUqOYootE4SfluOQO45J16ryMvZ1JKnbeYUP70gBIW4uM+nL44hZHwOoHWoFc40FiorO+DI4ID9fZWYJzc+XPlqMKoV0YBzo5Tv8Nv2MLaaOtzoXpMuUiyaWURgAkLIQ4Kq+lNg+BH+MQV05dt9wxQCAvxdB8E+7XnqUYv6cOPH1Y+5cTaEYfkL1v8T8aPhhS2oS8YRzRX5MnGb34VdU3j7XNizOblt999u1yWjKQg83LAUKqnQLzg/A==';
$decoded = decode_base64($encoded);
print $decoded;
@x0x8x
x0x8x / com_apple_MobileAsset_SoftwareUpdate (18-02-2016).xml
Created July 22, 2016 13:27
com_apple_MobileAsset_SoftwareUpdate (18-02-2016)
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Assets</key>
<array>
<dict>
<key>ActualMinimumSystemPartition</key>
<integer>1160</integer>
<key>Build</key>
#!/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
@x0x8x
x0x8x / git-export
Created May 12, 2017 02:40 — forked from toru-hamaguchi/git-export
Export files.
#!/bin/sh -
IFS="
"
OPTIONS_KEEPDASHDASH=
OPTIONS_SPEC="\
git export <options> <rev>{0,2}
--
o= Export directory.