Skip to content

Instantly share code, notes, and snippets.

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

w1ntermute MaSven

💭
I may be slow to respond.
View GitHub Profile
@mikedoubintchik
mikedoubintchik / spoof-mac-address.sh
Created March 3, 2017 23:27
Here's a little bash script snippet for randomizing and spoofing your MAC address both on OS X and Linux
#!/usr/bin/env bash
echo "Are you on Mac? [y,n]"
read input
if [[ $input == "Y" || $input == "y" ]]; then
## Show active interfaces
ifconfig | pcregrep -M -o '^[^\t:]+:([^\n]|\n\t)*status: active'
## Ask which interface to spoof
echo "Which interface are you spoofing?"
read interface
@mgedmin
mgedmin / jenkins.md
Last active April 3, 2019 17:33
Installing latest Jenkins on Ubuntu

Installing upstream Jenkins

  1. Make sure you don't have Jenkins installed from Ubuntu repositories -- you'll get problems if you try to mix it with upstream packages
apt-get purge jenkins --auto-remove
  1. Add the upstream Jenkins package repository
//package experiment2;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.*; // we use Sockets
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
//package experiment2;
import java.io.File;
import java.io.FileNotFoundException;
import java.net.*; // we use Sockets
import java.nio.file.Paths;
public class FileTransferClientUDPjlibcnds {
@trodrigues
trodrigues / gist:1023167
Created June 13, 2011 16:51
Checkout only certain branches with git-svn
If you want to clone an svn repository with git-svn but don't want it to push all the existing branches, here's what you should do.
* Clone with git-svn using the -T parameter to define your trunk path inside the svnrepo, at the same time instructing it to clone only the trunk:
git svn clone -T trunk http://example.com/PROJECT
* If instead of cloning trunk you just want to clone a certain branch, do the same thing but change the path given to -T:
git svn clone -T branches/somefeature http://example.com/PROJECT