-
Disable and stop the systemd-resolved service:
sudo systemctl disable systemd-resolved.service sudo systemctl stop systemd-resolved
-
Then put the following line in the
[main]
section of your/etc/NetworkManager/NetworkManager.conf
:
package main | |
import ( | |
"bufio" | |
"encoding/base64" | |
"flag" | |
"io" | |
"io/ioutil" | |
"log" | |
"net" |
# /etc/systemd/system/bt-agent.service | |
[Unit] | |
Description=Bluetooth Auth Agent | |
[Service] | |
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput | |
Type=simple | |
[Install] |
#!/bin/bash | |
# | |
# A script that takes a Twitter data archive, which is produced as a | |
# set of JavaScript files (different from the regular archive, which | |
# is CSV and HTML), and converts the `tweet.js` file, which contains | |
# all of the tweets, into tractable JSON, one tweet per line. It then | |
# inserts /that/ into a SQLite3 database, and extracts a simple | |
# relational table of tweets from the JSON. Finally, it runs datasette | |
# on the resulting database to allow you to explore. |
#!/usr/bin/env python | |
# | |
# erase the esp8266 flash | |
# sudo $(which esptool.py) --port /dev/ttyUSB0 erase_flash | |
# write the micropython firmware | |
# sudo $(which esptool.py) --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect -fm dio 0 /tmp/esp8266-20190125-v1.10.bin | |
# save this file to esp8266_wifi.py | |
# add your wireless network/password to the wifi.connect() line | |
# run: | |
# echo "f=open('/main.py','w')" |
(This is a translation of the original article in Japanese by moratorium08.)
(UPDATE (22/3/2019): Added some corrections provided by the original author.)
Writing your own OS to run on a handmade CPU is a pretty ambitious project, but I've managed to get it working pretty well so I'm going to write some notes about how I did it.
#!/bin/bash | |
# https://retropie.org.uk/forum/topic/2295/runcommand-warning-if-voltage-temperature-throttling | |
#Flag Bits | |
UNDERVOLTED=0x1 | |
CAPPED=0x2 | |
THROTTLED=0x4 | |
HAS_UNDERVOLTED=0x10000 | |
HAS_CAPPED=0x20000 |
package main | |
import ( | |
"errors" | |
"net" | |
"os" | |
"sync" | |
) | |
type StdinListener struct { |
This is pretty simple snippet to get API Token of a user , lets say "MYUser" in jenkins.
its pretty useful when you are working with 'jenkins-job-builder' to update jobs in jenkins,
and you need to get the api token which JJB needs inorder to update jobs to ..
run this code in either jenkins script console , or as i prefer, in form of init.groovy.
so when jenkins master starts, i create a user for JJb.
after that i get the token right away and pass it to my JJB jobs folder to file 'jenkins_jobs.ini' :)_ .
import jenkins.security.*
User u = User.get("Myuser")
; | |
; the "monitor ROM" of an apple 1 fit in one page (256 bytes). | |
; | |
; this is my attempt to take the disassembled code, give names to the | |
; variables and routines, and try to document how it worked. | |
; | |
; | |
; an apple 1 had 8KB of RAM (more, if you hacked on the motherboard), and a | |
; peripheral chip that drove the keyboard and video. the video was run by a | |
; side processor that could treat the display as an append-only terminal that |