Skip to content

Instantly share code, notes, and snippets.

@orette
orette / HGH5.txt
Created April 5, 2020 18:43 — forked from elconde/HGH5.txt
START-OF-FILE
DATALOADER_LOAD=['Instrument', 'PriceLinkDefinition', 'Latest Prices']
RUNDATE=20140714
PROGRAMFLAG=oneshot
CLOSINGVALUES=yes
@orette
orette / cisco-anyconnect-profile.md
Created January 8, 2020 13:45 — forked from JosefJezek/cisco-anyconnect-profile.md
Cisco AnyConnect VPN Profile

Cisco AnyConnect VPN Profile

Router IOS

webvpn import svc profile profile-example usbflash0:example.xml
webvpn context ctx-example
policy group vpn-group-example
svc profile profile-example
@orette
orette / disable.sh
Created July 4, 2018 16:04
Disable bunch of #$!@ in Sierra (Version 2.1)
#!/bin/bash
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevi
###############################################################################################
# LAMP setup for Ubuntu 16.04 Server #
# Apache + PHP + Percona #
###############################################################################################
# Update and prepare server
apt update; apt -y upgrade
apt -y install nano sudo curl wget git dnsutils lynx
sudo hostname srv.zdb.bz
sudo service hostname start
@orette
orette / 01-createObservableFromDeviceEventEmitter.js
Created May 23, 2018 11:59 — forked from sectore/01-createObservableFromDeviceEventEmitter.js
[React Native + RxJS] Create an Observable from DeviceEventEmitter - An example to handle 'locationUpdated' event
import React, {DeviceEventEmitter} from 'react-native';
import {Observable} from 'rx-lite'
/**
* Creates an Observable to listen to any event of DeviceEventEmitter
* @param type {string} Event type
*/
export default createObservableFromDeviceEventEmitter$ = type => {
let subscription;
return Observable.fromEventPattern(
@orette
orette / animatable actionbar
Created May 16, 2018 11:23 — forked from mitchhankins01/animatable actionbar
animatable actionbar
import React, { Component } from 'react';
import { View } from 'react-native';
import { Icon } from 'react-native-elements';
import * as Animatable from 'react-native-animatable';
class ActionBar extends Component {
constructor(props) {
super(props);
this.state = {};
}
@orette
orette / remove-android-bloatware
Created April 3, 2018 11:55
Remove applications including bloatware from Android devices
Enable USB debugging and connect the device to the computer.
From the command prompt, enter the following commands:
adb devices
adb shell
pm list packages | grep '<OEM/Carrier/App Name>'
pm uninstall -k --user 0 <name of package>
@orette
orette / ubuntu-openvpn-openconnect
Created January 28, 2018 16:22
cisco-any-connect-vpn
$ sudo apt-get install openvpn openconnect
$ sudo openvpn --mktun --dev tun1
$ sudo ifconfig tun1 up
$ sudo openconnect vpn.myserver.com [--authgroup=mygroup] --interface=tun1
$ sudo ifconfig tun1 down
$ sudo openvpn --rmtun --dev tun1
@orette
orette / instructions.txt
Last active January 12, 2018 17:12
web-directory-file-access-setup-
source:https://askubuntu.com/questions/767504/permissions-problems-with-var-www-html-and-my-own-home-directory-for-a-website
===
sudo chown -R ubuntu:www-data /var/www
sudo find /var/www -type d -exec chmod 2750 {} +
sudo find /var/www -type f -exec chmod 640 {} +
===
Explanation:
You should never have to run a website out of your home directory. EVER. You would otherwise have to give the web server the ability to traverse through /home/ to see the directory structure, but also into /home/$USER/ (your user's home directory, where we can try and see what else exists in your user directory), as well as any other subfolders in there. A poorly-configured or misconfigured or unpatched web server can cause massive data leakage this way, or loss of credentials and such which would put your personal data and logins on different things at risk. The symlink approach you are using doesn't help either for the same reason as trying to give Apache permissions to read /home/andre/www/moodle - the web server has to be able
All default printer settings can be set by accessing http://localhost:631/printers, selecting the printer then changing the default settings.