Skip to content

Instantly share code, notes, and snippets.

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

Wesley Werneck uelei

🏠
Working from home
View GitHub Profile
@uelei
uelei / Disable_dns.md
Created April 18, 2023 14:31
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • 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:

@uelei
uelei / WearProtection.js
Last active August 29, 2015 14:26
This code runs beforeSend on $.ajaxSetup (MAGIC) check out REALPYTHON FOR MORE MAGIC
// This function gets cookie with a given name
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
@uelei
uelei / splashscreenlandscape.py
Created June 17, 2015 17:35
splash screen resize for iOS in landscape
#!/usr/bin/env python
from PIL import Image
import os
import string
import sys
file = sys.argv[1]
sizes = ["2208,1242","1024,768","2048,1536"]
@uelei
uelei / splashscreenportrait.py
Created June 17, 2015 17:33
screen resize for iOS
#!/usr/bin/env python
from PIL import Image
import os
import string
import sys
file = sys.argv[1]
sizes = ["1242,2208","750,1334","640,960","640,1136","768,1024","1536,2048","320,480"]
@uelei
uelei / icon_resize.py
Created June 17, 2015 17:31
resize images for use in iOS app
#!/usr/bin/env python
from PIL import Image
import os
import sys
sizes = ["1024","512","29","40","58","76","80","87","120","152","180"]
img = Image.open(file)
i=0
// Photoshop Script to Create iOS and Android Icons
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@uelei
uelei / nginx.conf
Last active September 6, 2015 01:19 — forked from denys281/nginx.conf
nginx config for phpmyadmin
server {
# Listen on port 81
listen 81;
# Server name being used (exact name, wildcards or regular expression)
# server_name phpmyadmin.my;
root /usr/share/phpmyadmin;
@uelei
uelei / gist:1f75ff3d4b46c9c1c3a9
Created June 7, 2015 20:16
rodar o chorme em tela cheia e no site da netfix
/usr/bin/google-chrome --kiosk http://netflix.com
# default_user simone
# auto_login yes
@uelei
uelei / google sources on debian
Created June 7, 2015 20:05
google no debian
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
#
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
#
sudo apt-get update
#
#beta
#sudo apt-get install google-chrome-beta
#
#instavel