Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
require 'base64' | |
require 'rest_client' | |
class ExactOnlineClient | |
def xml_call topic, data=nil | |
if not @cookies | |
# Brutal login technique (as documented (-; ) | |
url = "https://start.exactonline.nl/docs/XMLDivisions.aspx" | |
response = RestClient.post url, {"_UserName_" => username, "_Password_" => password} | |
@cookies = response.cookies |
CREATE OR REPLACE FUNCTION public.json_append(data json, insert_data json) | |
RETURNS json | |
IMMUTABLE | |
LANGUAGE sql | |
AS $$ | |
SELECT ('{'||string_agg(to_json(key)||':'||value, ',')||'}')::json | |
FROM ( | |
SELECT * FROM json_each(data) | |
UNION ALL | |
SELECT * FROM json_each(insert_data) |
-- Theme generated by vim2theme | |
Description = "vim darcula" | |
Default = { Colour="#a9b7c6" } | |
Canvas = { Colour="#2b2b2b" } | |
Number = { Colour="#6897bb" } | |
Escape = { Colour="#cc7832" , Italic=true} | |
String = { Colour="#a5c25c" } | |
BlockComment = { Colour="#808080" } |
#!/bin/bash | |
# http://serverfault.com/questions/410321/debian-ip6tables-rules-setup-for-ipv6/410327#410327 | |
# http://ipset.netfilter.org/iptables.man.html | |
# https://www.sixxs.net/wiki/IPv6_Firewalling | |
# https://www.cyberciti.biz/faq/ip6tables-ipv6-firewall-for-linux/ | |
# https://gist.github.com/thomasfr/9712418 | |
# https://gist.github.com/SnakeDrak/f4150f6e517e5a1d525f | |
# http://www.thegeekstuff.com/2011/06/iptables-rules-examples | |
# http://www.thegeekstuff.com/scripts/iptables-rules |
onefetch
by either:
cargo install onefetch
$PATH
(such as /usr/local/bin/onefetch
).onefetch_on_cd.sh
to whatever file that gets run whenever you start a new Bash session. This differs per distro but common files include:
~/.bashrc
~/.bash_profile
~/.bash_aliases
?