Skip to content

Instantly share code, notes, and snippets.

@fullyninja
fullyninja / TMJiraDarkMode.js
Created February 24, 2021 01:43
A simple and hacky TamperMonkey script to convert Jira to dark mode. Sort of.
View TMJiraDarkMode.js
// ==UserScript==
// @name Jira Dark Mode
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Convert Jira to dark mode.
// @author Peter Evans
// @match https://*.atlassian.net/*
// @grant none
// @require https://cdn.walkme.com/player/resources/wmjQuery3315.js
// ==/UserScript==
View mastoapi_get_token.sh
#!/bin/sh
SCOPES='read write follow'
if [ "$#" = "1" ]; then
RESPONSE_APP=$(curl -XPOST -F 'client_name=DoYouSuckDicks' -F "redirect_uris=urn:ietf:wg:oauth:2.0:oob" -F "scopes=$SCOPES" -F 'website=https://example.org' https://$1/api/v1/apps)
CLIENT_ID=$(echo $RESPONSE_APP | jq -r .client_id)
CLIENT_SECRET=$(echo $RESPONSE_APP | jq -r .client_secret)
@Plasmoxy
Plasmoxy / HowToSetupJenkinsCIWithGitLab.md
Last active November 15, 2023 20:47
How to setup Continous Integration for GitLab with Jenkins (works for private projects)
View HowToSetupJenkinsCIWithGitLab.md

How to setup Continous Integration for GitLab with Jenkins

Hi, I'd like to share with you how I got my Jenkins CI set up for my private GitLab projects. This is more like a sheet of notes of mine, but I hope it'll help someone as I haven't found any good tutorial for Jenkins+Gitlab on the web yet :D

Here we go:

  • generate ssh keys on own server -> PUBLIC and PRIVATE ( no passphrase )
  • go to GitLab profile settings -> SSH keys -> add PUBLIC ssh key to GitLab = this will allow your Jenkins server to access your GitLab
  • also create full access GitLab API access token for Jenkins on your gitlab profile settings and keep it

  • install Git + GitLab plugin on Jenkins ( make sure they are enabled (ticked) in Jenkins !!!)
@random-robbie
random-robbie / requests.py
Last active October 26, 2021 02:10
Python Requests Ignore Bad SSL certificate
View requests.py
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
URL = "https://www.somesitewithbadssl.com"
headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0","Connection":"close","Accept-Language":"en-US,en;q=0.5","Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","Upgrade-Insecure-Requests":"1"}
response = session.get(URL, headers=headers, timeout=15, verify=False)
result = response.text
print (result)
@tzapu
tzapu / AutoConnectWithHTTPServer
Created February 8, 2016 07:25
WiFiManager auto connect and start a http web server
View AutoConnectWithHTTPServer
#include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino
//needed for library
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include "WiFiManager.h" //https://github.com/tzapu/WiFiManager
std::unique_ptr<ESP8266WebServer> server;
void handleRoot() {
@nhimf
nhimf / mqtt-to-influx.py
Created February 4, 2016 21:08
Very crude Python script to transfer data from mqtt to InfluxDB
View mqtt-to-influx.py
import paho.mqtt.client as mqtt
from influxdb import InfluxDBClient
import datetime
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, flags, rc):
print("Connected with result code "+str(rc))
# Subscribing in on_connect() means that if we lose the connection and
# reconnect then subscriptions will be renewed.
@ilevantis
ilevantis / Mixcloud RSSifier
Last active March 22, 2022 23:43
Turn mixcloud streams into an RSS feed e.g. for mixcloud.com/<mixcloudstream>/playlists/<streamplaylist-if-there-is-one>/ go to mysite.com/mixcloud-rssifier/?fname=<mixcloudstream>&lname=<streamplaylist-if-there-is-one> to get an RSS feed of the stream or the playlist from the stream
View Mixcloud RSSifier
<?php
header('Content-Type: application/rss+xml; charset=UTF-8');
// suck in the query string variables
$feed_name = htmlspecialchars($_GET['fname']);
$list_name = htmlspecialchars($_GET['lname']);
// compose the api urls + other stuff depending on presence of playlist
if(isset($_GET['lname'])) {
$json_url = 'http://api.mixcloud.com/'.$feed_name.'/playlists/'.$list_name.'/cloudcasts/';
@godber
godber / AUTHORS
Last active July 4, 2023 13:21
pdfinfo - A simple python wrapper of the pdfinfo command line tool.
View AUTHORS
Austin Godber - godber@uberhip.com
@thedod
thedod / FUD.LOL
Last active December 12, 2015 08:18
ZOMG! I CAN RITE LOLCODE!!1
View FUD.LOL
HAI 1.2 BTW I DOAN KNOE Y I SAY STUPH LIEK 1.2 LOL
I HAS A FUD
I HAS A EMPTY ITZ FAIL
I HAS A STUPH ITZ MAEK EMPTY A NUMBR
I HAS A EATED ITZ "OM NOM NOM U HAZ NO :{FUD} I EATED IT"
IM IN YR KITCHEN NERFIN YR STUPH TIL EMPTY
VISIBLE "WUT DO U HAS?"
GIMMEH FUD
FUD, WTF?
OMG "NOTHING"
@misja
misja / tweepy_status_monkeypatch.py
Created August 31, 2011 12:30
Set json data as an attribute in a tweepy Status object.
View tweepy_status_monkeypatch.py
import tweepy
import json
@classmethod
def parse(cls, api, raw):
status = cls.first_parse(api, raw)
setattr(status, 'json', json.dumps(raw))
return status
tweepy.models.Status.first_parse = tweepy.models.Status.parse