Skip to content

Instantly share code, notes, and snippets.

# Boxstarter Script (Windows 10 settings and modern web deployment)
# Credit to github.com/elithrar
# Pre
Disable-UAC
# Set PC name
$computername = "JASM-PC"
if ($env:computername -ne $computername) {
Rename-Computer -NewName $computername
@nullcookies
nullcookies / email.js.slim
Created January 10, 2020 08:56 — forked from sshkarupa/email.js.slim
coding email address through js
.email
|По всем вопросам обращайтесь на 
javascript:
var aixccwp = ["l", "@", "m", "g", "a", "p", "=", "@", "<", "h", "<", "s", "g", "a", "p", "\"", "l", "h", "e", "s", "k", "m", "i", "i", "i", "m", "k", ">", "r", "r", "\"", "s", "a", ".", " ", "o", "a", "o", "r", "a", "a", "t", ":", "s", "a", "o", "u", "m", "c", "m", ">", "a", "a", ".", ".", ".", "f", "h", "/", "u", "c", "l"];
var fsklvjp = [31, 26, 57, 49, 47, 24, 7, 48, 58, 41, 0, 40, 27, 1, 46, 8, 53, 19, 5, 38, 42, 9, 30, 11, 52, 50, 20, 61, 44, 4, 36, 16, 10, 32, 2, 34, 60, 14, 22, 43, 51, 13, 15, 18, 25, 56, 23, 35, 33, 28, 37, 29, 21, 39, 54, 17, 6, 3, 59, 45, 55, 12];
var lqnbuaw = new Array();
for(var i=0; i<fsklvjp.length; i++){ lqnbuaw[fsklvjp[i]] = aixccwp[i]; }
for(var i=0; i<lqnbuaw.length; i++){ document.write(lqnbuaw[i]); }
noscript Please enable Javascript to see the email address
@nullcookies
nullcookies / email_js.rb
Created January 10, 2020 08:56 — forked from sshkarupa/email_js.rb
letters generator for email.js.slim
str = '<a href="mailto:#{ARGV[0]}">#{ARGV[0]}</a>'
# ARGV[0] = 'user@example.com'
# str = '<a href="mailto:user@example">user@example</a>'
original = str.split("")
new_arr = []
original.each_index {|i| new_mas << { i => original[i] } }
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha256-NJWeQ+bs82iAeoT5Ktmqbi3NXwxcHlfaVejzJI2dklU=" crossorigin="anonymous" />
@nullcookies
nullcookies / httparty.md
Created December 30, 2019 13:47 — forked from pwightman/httparty.md
HTTParty usage

This is a much simpler HTTP library called HTTParty. The standard library that comes with Ruby is quite verbose, you have to convert a string to a URL, specify URLs and ports and all sorts of longwinded stuff. This is much easier. There's both a command line interface, if you just want to test things out for the queue at the command line, for example, as well as a ruby library. I'll show both here. You can install it with gem install httparty.

Command-line usage:

httparty -H Accept:application/json "http://nine.eng.utah.edu/schools"

# Accepts JSON, uses POST instead of GET, and does BASIC authentcation, which the queue requires
# once you've logged in. I can show you that later.
httparty -H Accept:application/json -a post -u username:password "http://nine.eng.utah.edu/schools"
# Help for @lazylead
licence_file_path = "test_licence.txt"
file_name_teplate = /.+\.txt$/
dir_path = 'one'
puts "Licence file: #{licence_file_path}\nFile name template: #{file_name_teplate.inspect}\nDirpath: #{dir_path}\nLicence text:\n"
p licence_text = File.read(licence_file_path)
stack = [dir_path]
@nullcookies
nullcookies / httparty.rb
Created December 17, 2019 14:58 — forked from jeffdonthemic/httparty.rb
HTTParty Examples
options = { :body =>
{ :username => 'my',
:password => 'password'
}
}
results = HTTParty.post("http://api.topcoder.com/v2/auth", options)
##
## example for post with papertrail and basic auth
##
@nullcookies
nullcookies / php
Created December 17, 2019 06:14 — forked from LeMaX10/ScheduleFormatter.php
Schedule Formatter
<?php
use Carbon\Carbon;
use October\Rain\Database\Collection;
/**
* Class ScheduleFormatter
*/
class ScheduleFormatter
{
@nullcookies
nullcookies / func_random_key.php
Created October 17, 2019 14:21 — forked from eslavon/func_random_key.php
func_random_key
<?php
function keyGenerate($leight) {
if (is_int($leight)) {
$array = array("1", "2", "3", "4", "5", "6", "7", "8", "9","0",
"A","B","D","E","F","G","H","I","J","K","L","M",
"N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
$count = count($array)-1;
$result = "";
for ($i = 1; $i <= $leight; $i++) {
$random = mt_rand(0,$count);
@nullcookies
nullcookies / filtration.php
Created October 17, 2019 14:21 — forked from eslavon/filtration.php
Удаление элемента из многомерного массива
<?php
$ids = array_column($array, "address");
$ids = array_unique($ids);
$result_array = array_filter(
$array,
function ($key, $value) use ($ids) {
return in_array($value, array_keys($ids));
},
ARRAY_FILTER_USE_BOTH
);