[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]
4chanarchives logo

Archived threads in /g/ - Technology - 3021. page


File: photo.png (8KB, 100x100px) Image search: [Google] [Yandex] [Bing]
photo.png
8KB, 100x100px
Why do we hate him?
132 posts and 17 images submitted.
>>
>>51790317
I hate you, Dennis.
>>
>>51790317
I love him.
>>
>>51790317
His voice sounds like he got his testicles removed when little.

So, /g/, a while back there was this thread in which people were showing off cool linux scripts and/or python scripts. I figured it was time to start that up again. So, /g/, show me your scripts.

Rules:
>explain what the code does
>no malicious code unless explained to be
>if copypasta give credit

I'll start. This one finds the average color of the gnome de then sets your terminal background as the color.
#!/usr/bin/python2

from PIL import Image
import os
import re

def compute_average_image_color(img):
width, height = img.size

r_ave = 0
g_ave = 0
b_ave = 0

for x in range(0, width):
for y in range(0, height):
r, g, b = img.getpixel((x,y))
r_ave = (r + r_ave) / 2
g_ave = (g + g_ave) / 2
b_ave = (b + b_ave) / 2

return (r_ave, g_ave, b_ave)
location = os.popen('gsettings get org.gnome.desktop.background picture-uri')
loc_mod = location.read()
loc_mod = loc_mod[8:-2]
img = Image.open(loc_mod)
img = img.resize((200,100)) # Small optimization
average_color = compute_average_image_color(img)
average_color = """ "'rgb """ + str(average_color) + """ '" """
average_color = re.sub(' ', '', average_color)
output = "dconf write /org/gnome/terminal/legacy/profiles:/:68776a23-af20-4589-a2b9-6ee6622a8ffc/background-color " + average_color
os.system(output)
35 posts and 5 images submitted.
>>
command_not_found_handle() {
echo -e ">implying error"
return 127
}

.bashrc, this code changes the output if you type in some command that doesn't exist for example. -e option if you want to use color-codes.
>>

makezip()
{
zip -r "${1%%/}.zip" "$1";
}
maketar()
{
tar cvzf "${1%%/}.tar.gz" "${1%%/}/";
}
extract()
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' >extract< failed" ;;
esac
else
echo "'$1' not valid"
fi
}

.bashrc for easier extracting and packaging.
>>

function lowercase()
{
for file ; do
filename=${file##*/}
case "$filename" in
*/*) dirname==${file%/*} ;;
*) dirname=.;;
esac
nf=$(echo $filename | tr A-Z a-z)
newname="${dirname}/${nf}"
if [ "$nf" != "$filename" ]; then
mv "$file" "$newname"
echo "lowercase: $file --> $newname"
else
echo "lowercase: $file not changed."
fi
done
}
function swap()
{
local TMPFILE=tmp.$$

[ $# -ne 2 ] && echo "swap: 2 arguments needed" && return 1
[ ! -e $1 ] && echo "swap: $1 does not exist" && return 1
[ ! -e $2 ] && echo "swap: $2 does not exist" && return 1

mv -v "$1" $TMPFILE
mv -v "$2" "$1"
mv -v $TMPFILE "$2"
echo "Done: $1 & $2 switched filenames!!!"
}
function calc()
{
awk "BEGIN{print $*}";
}

lowercase does what it says, swap [file1] [file2] changes the filenames between two files, calc is a simple calculator with awk

File: 20151210_183131.jpg (604KB, 1445x1084px) Image search: [Google] [Yandex] [Bing]
20151210_183131.jpg
604KB, 1445x1084px
Hi guys,
wanna share with you my homemade solution to GPU sag.

Card is a GTX980 G1 and it's got a sag worth of a granny's rack.

So here's what i come up with.

Plastic brackets, so I have electrical insulation. This plastics were taken from some leftovers, nothing purpouse built.
Just made some cuts here and there, some fittings.

Used nuts n bolts for securing.
Now everything is ROCK SOLID, the GPU just doesn't move at all.

NOTE: this is it's neutral position when chassis lays on the side. Guess i was lucky with the bracked being aligned.

Rate, comment, rage, insult.

>inb4 green
yeah as i said, plastic leftover. Did not have the choice.
11 posts and 5 images submitted.
>>
File: 20151210_183029.jpg (414KB, 1084x1445px) Image search: [Google] [Yandex] [Bing]
20151210_183029.jpg
414KB, 1084x1445px
another view
>>
File: 20151210_183121.jpg (423KB, 1084x1445px) Image search: [Google] [Yandex] [Bing]
20151210_183121.jpg
423KB, 1084x1445px
And another.

Let me hear your opinions. I think that's already doing a great job, may come up with some additional fit, finish, polishing, etc.
>>
File: GUTS.jpg (2MB, 3000x2000px) Image search: [Google] [Yandex] [Bing]
GUTS.jpg
2MB, 3000x2000px
>>51790050
Maybe instead of routing your PCI-E power cables from the bottom (dragging the GPU down) you should route them from the top (like pic related) and the GPU won't sag as badly. Might still sag, but it will help stop the sag.

This is mine, never had a problem with sag.

File: images.png (4KB, 343x147px) Image search: [Google] [Yandex] [Bing]
images.png
4KB, 343x147px
sup /g/
I'm considering learning latex as a humanities student in order to write my thesis
is it worth the effort? also can you recommend me any good latex editor for mac?

thanks /g/uys
45 posts and 4 images submitted.
>>
>>51789957
>>>/his/
>>
>>51789957
Post tits
>>
>>51789991
sorry man, I doubt you want to see my mantits

File: MACBOOKPRO.jpg (185KB, 1200x630px) Image search: [Google] [Yandex] [Bing]
MACBOOKPRO.jpg
185KB, 1200x630px
Moving from corporate .NET Windows land to startup hipster OS X Silicon Valley to start a new job in a couple weeks.

I'm pretty familiar with OS X, but I've never really used it for dev. Tell me what you like.
> Command line GIT or GUI client?
> Favorite Editor/IDE?
> Terminal Addons/Replacement?
> Package Manager?
> Finder Addons/Replacement?
> Any other favorite program?
14 posts and 3 images submitted.
>>
>>51789936
If youre going to write some Mac software, be adviced, GUI client is the way to go, unless it's some niche finicky thing, even then, GUI is the way to go.
OS X terminal shouldn't need to be replaced, it's pretty god tier.
Good luck trying to replace Finder, it's always running and the system doesn't like it when it's not.
>>
>>51789936

> Command line GIT or GUI client?
depends what you're doing, command line will be fine for basic stuff

> Favorite Editor/IDE?
Depends what you're programming, front end web dev go with Brackets, sublime for pretty much all else, python go with pycharm

> Terminal Addons/Replacement?
pip, homebrew

transmit is a great ftp client
>>
File: 1448820349118.jpg (232KB, 1500x1120px) Image search: [Google] [Yandex] [Bing]
1448820349118.jpg
232KB, 1500x1120px
>>51789936
>going to start eating shit from my hands in a couple weeks

Why would anyone do this?

File: BK-450.png (1MB, 1800x1800px) Image search: [Google] [Yandex] [Bing]
BK-450.png
1MB, 1800x1800px
What kind of writing instruments do you use on a daily basis? As a line cook, when I do prep, I'm always writing lists for the day and crossing items off as I go, dating prep tubs, etc. I've found that pens with triangular grips are the easiest to use. What do you guys think?
19 posts and 7 images submitted.
>>
>>51789884
I used to care what I write with.
Now I sketch a lot and write a little bit on a daily basis (mechanical engineering).
Somehow I don't care anymore, I just use whatever.
>>
>>51789946
Do you do drafting?
>>
>>51790157
Yes, but it's done on computer.
I use hand operated writing technology for developing ideas, rough design calculations, etc.

Why exactly aren't you using Elementary OS?
79 posts and 14 images submitted.
>>
>>51789858
That looks awful.
>>
Because Windows
>>
Because I don't have elementary needs.

i know people will go full rage because of "gaming" headset and >headset in particular
but can somebody please tell me the whats the difference between these two headsets?
KHX-H3CL/WR HyperX Cloud and Kingston KHX-HSCC-ER HyperX Cloud Core.
i've read somewhere that KHX-H3CL have more features but i cant find it anywhere what features exactly? thanks in advance
13 posts and 2 images submitted.
>>
one bump
>>
>>51789845
I don't know, but I have the cloud and they are pretty nice. Good sound quality
>>
>>51789845
Core doesn't have a few accessories and the memory foam. Cloud II comes with a USB sound card which is good if your motherboard is shit. I personally own the Cloud 1 and love it.

File: 851322374_13229.jpg (41KB, 500x604px) Image search: [Google] [Yandex] [Bing]
851322374_13229.jpg
41KB, 500x604px
How did functional programming change you? How is it good or bad ?

Clojure guy here, after learning clojure I became much more productive and everything I can do soo many thing with very less code. Feels great brah
16 posts and 1 images submitted.
>>
>>51789745
it got confusing as fuck because my applications didn't benefit from it
>>
Clojure is not a Lisp.
>>
>>51789833
Then what is it you nigger nogger asshole clogger

File: 0132856204.jpg (111KB, 539x648px) Image search: [Google] [Yandex] [Bing]
0132856204.jpg
111KB, 539x648px
Why should I learn this?

I already know basics about socket programming.
15 posts and 3 images submitted.
>>
You shouldnt. And sockets are useless too
>>
>>51789645
Socket programming isn't even 10% of networking.
You'll also need to synchronize data streams, manage QoS, design high level protocols, implement encryption and so forth.
Don't be THAT programmer who thinks that the only programming language you ever need is JavaScript.
>>
File: house-falling-apart.jpg (91KB, 768x510px) Image search: [Google] [Yandex] [Bing]
house-falling-apart.jpg
91KB, 768x510px
Why should you understand something to build other things on top of it?

File: 51n8Zdjr7eL._SY300_.jpg (15KB, 300x300px) Image search: [Google] [Yandex] [Bing]
51n8Zdjr7eL._SY300_.jpg
15KB, 300x300px
I just ordered this box of staples how bad did i fuck up?
12 posts and 1 images submitted.
>>
Not much at all, just some ordary staples with 4 stars on Amazon
>>
>>51789296
>tfw all staplers are referred to as bostitch in your country
>>
>>51789500
What country is that?

No thread in catalog, so there you have it.

Servers general, post your servers, post uses, ask questions!

I just started and already got my first hdd failure on RAID1, not gonna get another hdd, so is it better to wipe everything and start again with no raid or a 1hdd raid1 will normalize it's performance to run as just a single hdd with no raid?
10 posts and 2 images submitted.
>>
>Storage/backup server
I have currently 4 5400rpm drives in a hardware raid 5 and sometimes the write speed slows the whole system down, sometimes to the point where even other shares on another drive are affected.
Considering to buy a new raid controller with max cache/cachecade (ssds as cache for reads and writes) and 7200 rpm drives.
>>
Anyone has experience with 15000 rpm drives? Are they worth it or a raid 0 of regular 7200 better?
>>
>>51790609
>15k drives better random read/write performance than 7200 drives
If you need a lot of iops use a ssd, even cheap consumer ssds outperform 15k enterprise sas drives.

File: 79334.png (18KB, 650x280px) Image search: [Google] [Yandex] [Bing]
79334.png
18KB, 650x280px
IT'S OVER, QUALSHIT IS FINISHED & BANKRUPT
34 posts and 7 images submitted.
>>
It's not fucking fair. Qualcomm is an SoC company, that's all they do. Apple is a fashion company. How do they manage that kind of IPC in their processors?
>>
>>51789422
Jim Keller.
>>
File: 79329.png (17KB, 650x280px) Image search: [Google] [Yandex] [Bing]
79329.png
17KB, 650x280px
>>51789084
You misspelled Apple.

File: Pixel-C-Header.jpg (526KB, 1500x1000px) Image search: [Google] [Yandex] [Bing]
Pixel-C-Header.jpg
526KB, 1500x1000px
Should I shill?
17 posts and 3 images submitted.
>>
Only if you get paid
>>
>>51789045
I forgot this thing existed after the joke that is the iPad Pro got all the attention, what's up with the Pixel C and why would I buy it over a Surface?
>>
Shill Nye the Goyim guy
SHILL!
SHILL!
SHILL!
SHILL!

File: ss.png (50KB, 987x126px) Image search: [Google] [Yandex] [Bing]
ss.png
50KB, 987x126px
Never lose your cool edition.

Intended for users of all levels, including absolute beginners.

There are three ways to try Linux, you can:

1) Install a Linux OS on a VM (Virtual Machine/VirtualBox) for "safety purposes"
2) Use the Live ISO directly without installing anything, that way, you can get a "full Linux experience".
3) Go balls deep and overwrite everything with Linux (not recommended)

If you are serious about switching to Linux and if you have Windows dual-booted (recommended for pure newbies),
we recommend you use it exclusively for 2 weeks, and avoid Windows dual booting for that period of time, or it's
likely you will start retreating back to windows instead of getting used to GNU/Linux as your new home and working on
making it feel the way you want it.

>Recommended for beginners:
-Ubuntu MATE
-Debian (For Broadcom devices, use an ISO that includes non-free firmware)
-openSUSE
-LinuxMint (a.k.a Ubuntu LTS + Cinnamon)

Before asking, please find the answers to your questions in resources.

Please be civil, notice the "Friendly" in every Friendly Linux Thread.

Understand that much of your software from Windows will be unavailable, although maybe wine can make up for it.

Resources:
man <insert command here>
your friendly neighborhood search engine
https://www.codecademy.com/en/courses/learn-the-command-line
https://wiki.archlinux.org/
https://wiki.installgentoo.com/
315 posts and 25 images submitted.
>>
What is Linux (or GNU/Linux for Stallmanists)?
https://wiki.installgentoo.com/index.php/GNU/Linux

Babby's First Linux (What distro to choose?)
https://wiki.installgentoo.com/index.php/Babbies_First_Linux

What software does /g/ recommend? (Please DON'T include the so called infographic -- refer all your recommended software here.)
https://wiki.installgentoo.com/index.php/List_of_recommended_GNU/Linux_software

Ricing on Linux (Make it good and functional or make it worse like those at desktop threads)
https://wiki.installgentoo.com/index.php/GNU/Linux_ricing

A script designed to ease the transition from Windows to Debian
https://github.com/Chocolate-Chip-Computing/DebianNewbieScript

We now have an entry in the install Gentoo wiki!
https://wiki.installgentoo.com/index.php//flt/

IRC No one uses:
irc://irc.freenode.org:+7000/FriendlyLinux
>>
>>51788384

Reposting
>>
>no drivers
>no worthwhile applications
>shittiest sound system of any OS
>WINE the only worthwhile program
>WINE only works with 1 out of 10 programs
>community of raging autistic man children
>10 utilities for any 1 task
>Each of those 10 utilities are terrible in their own unique way

Pages: [First page] [Previous page] [3012] [3013] [3014] [3015] [3016] [3017] [3018] [3019] [3020] [3021] [3022] [3023] [3024] [3025] [3026] [3027] [3028] [3029] [3030] [Next page] [Last page]
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK