working on it ...

Filters

Explore InChannel Snippets

Sort by

Found 500 snippets

    public by RexPhillips modified Monday at 1:13:25 PM  11  0  2  0

    RenameFilesInDirectoryWildcard

    Powershell snippet to rename files in a directory in a batch mode.
    dir | rename-item -NewName {$_.name -replace "DEV","PROD"}

    public by ElectroSoft modified Jul 15, 2017  61  0  3  0

    Prueba de Ajax

    Prueba de Axaj en javascript nativo.
    function ajax()
    {
        var elements = document.getElementsByClassName("formVal");
        var formData = new FormData(); 
        for(var i=0; i<elements.length; i++)
        {
            formData.append(elements[i].name, elements[i].value);
        }
        var xmlHttp = new XMLHttpRequest();
            xmlHttp.onreadystatechange = function()
            {
                if(xmlHttp.readyState == 4 && xmlHttp.status == 200)
                {
                    alert(xmlHttp.responseText);
                }
            }
            xmlHttp.open("post", "prueba.php"); 
            xmlHttp.send(formData); 
    }

    public by Flex modified Jun 27, 2017  57  0  2  0

    My server

    // Enter here the actual content of the snippet.						FULL SCREEN COPY CODE EMBED post this codeCOPY EMBED CODE
    <iframe id="embedFrame" style="width:600px; height:300px;"
    src="https://www.snip2code.com/Embed/1903952/Advertise-your-Discord-server---everywhe?startLine=0"></iframe>
    Click on the embed code to copy it into your clipboardWidth Height
    Leave empty to retrieve all the contentStart End
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    # Free people for your Discord server!
    ![Analytics](https://ga-beacon.appspot.com/UA-88945071-1/welcome-page) (1039 views in March)
    Server owners hate me! But today you'll see this one crazy and simple trick to increase your Discord server's size IMMEDIATELY! Wanna reach the same size as the Café does? **Advertise as much as you can!**
    Found more? [Ask __austinhuang#1076__](http://discord.me/0131) for edits. ~~No server owners that hate me kthx~~ By the way...
    1. **IT IS NOT SUGGESTED TO ADVERTISE IN THE COMMENT BOX IN THIS GIST** but I won't remove them anyways unless you spam.
    2. I actually hate new listing servers. The requirement of putting your server on the list is:
    * 50+ members
    * A variety of listings, judged by myself
    * (Optional) A partnership to my server
    ## Websites
    Sorted in size (Large to Small).
    * [Discord Servers](http://discservs.co)
      * Largest (10000+ servers), second-most traffic, and probably oldest
      * Server owners can bump every 6 hours, *unstable*
      * Have server message stats
    * [Discord.me](http://discord.me)
      * Second-Largest (9000+ servers), most traffic
      * Server owners can bump every 6 hours
      * Free custom link for invites
    * [DiscordList.net](http://discordlist.net)
      * 8000+ servers, along with bots
      * Submission by bot
      * Server owners can bump every 4 hours for free
      * Can view live messages and per-member activity stats
    * [DiscordList.me](http://discordlist.me)
      * 3000+ servers
      * Server owners can bump every 6 hours for free
      * Free custom link for invites
      * Server members can vote for servers (using the + button)
    * [Discord Server Hub](http://discord.shoutwiki.com/wiki/Server_List)
      * 150+ servers, along with bots
      * Server owners can create custom pages, support images and fonts
      * **Manual** Submission using request pages
    * [DiscordList.com](http://discordlist.com)
      * 85 servers
      * **Manual** Submission by GitHub pull request
      
    *Traffic stats based on Alexa and SimilarWeb. All stats are made on December 11, 2016 and will not be updated frequently.*
    ## Listing Servers
    Unordered. Note that some listing servers require you to stay in the server in order to keep your advertisement, so read server rules before dropping off your submission.
    * [Discord Server List](http://discord.me/list) (Ask an admin)
    * [Server Central](https://discord.gg/tNBd92m) (#submit-a-server)
    * [The Portal](https://discord.gg/6HtGJ98) (Just put your server in one category)
    * [Transfer Station](https://discord.gg/PcJKPrd) (Post in #channel-links or #18plus)
    * [United Server Listings](https://discord.gg/GM2AqsR) (#submit-server)
    * [Server Hub](https://discord.gg/vYnZD6W) (Just put your server in one category)
    * [Discord Universe](https://discord.gg/GvhggBF) (#server-submit)
    * [Server Savvy](https://discord.gg/qTgqrUA) (#submit-server)
    * [Advertisement Server](https://discord.gg/3hWkzf5) (#advertise-here)
    * [Pandora](https://discord.gg/dyrnkrC) (Just put your server in one category)
    * [Discord advertisement](https://discord.gg/fR8ptNC) (#server_advertisements)
    * [The Teahouse](https://discord.gg/sfrhqZT) (#submit_server)
    * [Invite Archive](https://discord.gg/dP72mM2) (Just put your server in one category)
    * [Server List](https://discord.gg/E595wJe) (Type `?rank server poster` then put server in category)
    ## Listing Bots
    Aside of website bots.
    * [Mew](http://bot.discord.io/mewbot) (`.bump` every 4 hours)
    * [The Directory (former Discord World)](https://discordapp.com/oauth2/authorize?client_id=270604492397871104&scope=bot&permissions=351297) (`dlist <Category>` then `dbump` every 4 hours)
    * [ServerHub](https://discordapp.com/oauth2/authorize?client_id=277420177283481601&scope=bot&permissions=351297) (`!!bump` every 4 hours)
    * [Mob](https://discordapp.com/oauth2/authorize?client_id=272362090994335744&scope=bot) (`$addme` then `$bump` every 2 hours)
    ## Efficiency
    Thanks [Steambot Server](https://discord.gg/w8gx343) for stats.
    ```
    Dec-16 Jan-12 Change
    =====        =====        
    Total Server Members
    595     797      202
    =====        =====        
    Invite for The Portal            
    2        4        2
    =====        =====        
    Invite for Server Central        
    0        0        0
    =====        =====        
    Invite for: United Server Listings    
    0        2        2
    =====        =====        
    Invite for: ServerHound (DiscordList.net)       
    0        8        8
    ```
    ## Others
    * [An iOS app](https://itunes.apple.com/ca/app
    						heres my discord server 

    public by Tech_JA modified Jun 10, 2017  74  0  3  0

    web.config

    web.config for IIS 8.5 to work with SLIM framework
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="slim" patternSyntax="Wildcard">
                        <match url="*" />
                        <conditions>
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        </conditions>
                        <action type="Rewrite" url="index.php" />
                    </rule>
                </rules>
            </rewrite>
    		<httpProtocol>
    			<customHeaders>
    				<add name="Access-Control-Allow-Origin" value="*" />
    			</customHeaders>
    		</httpProtocol>
        </system.webServer>
    </configuration>           

    public by RobertKnoester modified Jun 4, 2017  117  1  3  0

    comment_line

    comment_line
    //////////////////////////////////////////////////////////////////

    public by eliev modified Jun 4, 2017  117  9  2  0

    Logo - with animation full CSS

    amazing way to present a logo in SVG
    <div class="codepad-logo">
        <div class="logo"></div>
    </div>
    
    <style>
    html,
    body {
      height: 100%;
    }
    
    body {
      position: relative;
      background-color: #0f222b;
    }
    
    *,
    *::before,
    *::after {
      box-sizing: border-box;
    }
    
    .codepad-logo, 
    .codepad-logo::before, 
    .codepad-logo::after {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
    }
    
    .codepad-logo {
      width: 200px;
      height: 200px;
      margin: auto;
      color: #3498db;
      border-radius: 6px;
      box-shadow: inset 0 0 0 1px #3498db;
      transform: rotate(45deg);
    }
    
    .logo {
        background: url("https://nucleos.ch/images/logo.svg") no-repeat 50%/70%;
        width: 100%;
        height: 100%;
        transform: rotate(-45deg);
    }
    
    .codepad-logo::before, 
    .codepad-logo::after {
      content: '';
      z-index: -1;
      margin: -5%;
      box-shadow: inset 0 0 0 2px;
      border-radius: 6px;
      animation: clipIt 8s linear infinite;
    }
    .codepad-logo::before {
      animation-delay: -4s;
    }
    
    @keyframes clipIt {
      0%, 100% { clip: rect(0px, 220px, 2px, 0px); }
      25%      { clip: rect(0px, 2px, 220px, 0px); }
      50%      { clip: rect(218px, 220px, 220px, 0px); }
      75%      { clip: rect(0px, 220px, 220px, 218px); }
    }
    
    </style>            

    public by Tech_JA modified May 31, 2017  484  1  5  1

    Nightly Development Builds

    http://downloads.kicad-pcb.org/windows/nightly/                                                            

    public by nand3 modified May 28, 2017  173  0  3  1

    hello word

    <html>
    <body>
    <h1>hello word</h1>
    </body>
    
    </html>            

    public by marceloviana modified May 26, 2017  106  0  2  0

    Chamando função assincrona via console

    static void Main()
    {
        RunAsync().Wait();
    }
    
    private static async Task RunAsync()
    {
        …
    }

    public by slavka1979 modified May 26, 2017  111  1  3  0

    Promise.all for Rejections and Resolves

    Always call then, even when one promise rejects
    // https://davidwalsh.name/promises-results
    Promise.all([
        // Resolves
        Promise.resolve(1), 
        // Rejects after 2 seconds
        new Promise((resolve, reject) => setTimeout(() => reject(1), 2000))
    ].map(p => p.catch(() => undefined))).then(() => console.log('done!'));
    • Public Snippets
    • Channels Snippets